Geoff Lang | 13e569d | 2015-06-05 14:33:37 -0400 | [diff] [blame] | 1 | # How to build ANGLE in Chromium for dev |
| 2 | |
| 3 | ## Introduction |
| 4 | |
| 5 | ANGLE is normally built on Windows but parts of it are cross platform including the shader validator and translator. These parts can be built and tested inside a Chromium checkout. |
| 6 | |
| 7 | ## Details |
| 8 | |
| 9 | Steps: |
| 10 | |
| 11 | * Checkout and build [Chromium](http://dev.chromium.org/Home). |
| 12 | * To setup run these commands (note similarity to [DevSetup](DevSetup.md)): |
| 13 | |
| 14 | ```bash |
| 15 | cd src/third_party/angle |
| 16 | gclient config --name . --unmanaged https://chromium.googlesource.com/angle/angle.git |
| 17 | |
| 18 | gclient sync |
| 19 | git checkout master |
| 20 | ``` |
| 21 | |
| 22 | * To make the build files run these commands |
| 23 | |
| 24 | ```bash |
| 25 | cd src/third_party/angle |
| 26 | GYP_GENERATORS=ninja gclient runhooks |
| 27 | ``` |
| 28 | |
| 29 | * To build |
| 30 | |
| 31 | ```bash |
| 32 | cd src/third_party/angle |
| 33 | ninja -j 10 -k1 -C out/Debug |
| 34 | ``` |
| 35 | |
| 36 | * To build a specific target add the target at the end: |
| 37 | |
| 38 | ```bash |
| 39 | cd src/third_party/angle |
| 40 | ninja -j 10 -k1 -C out/Debug angle_compiler_tests |
| 41 | ``` |
| 42 | |
| 43 | * To run |
| 44 | |
| 45 | ```bash |
| 46 | cd src/third_party/angle |
| 47 | ./out/Debug/angle_compiler_tests |
| 48 | ``` |
| 49 | |
| 50 | ## Working with Top of Tree ANGLE in Chromium |
| 51 | |
| 52 | If you're actively developing within ANGLE in your Chromium workspace you will want to work with top of tree ANGLE. To do this do the following: |
| 53 | |
| 54 | * Ignore ANGLE in your `.gclient` |
| 55 | |
| 56 | ```python |
| 57 | solutions = [ |
| 58 | { |
| 59 | # ... |
| 60 | u'custom_deps': |
| 61 | { |
| 62 | "src/third_party/angle": None, |
| 63 | }, |
| 64 | }, |
| 65 | ] |
| 66 | ``` |
| 67 | |
| 68 | You then have full control over your ANGLE workspace and are responsible for running all git commands (pull, rebase, etc.) for managing your branches. |
| 69 | |
| 70 | If you decide you need to go back to the DEPS version of ANGLE: |
| 71 | * Comment out the `src/third_party/angle` line in your `custom_deps`. |
| 72 | * Go into your ANGLE workspace and switch back to the master branch (ensure there are no modified or new files). |
| 73 | * `gclient sync` your Chromium workspace. |