blob: bd3759d2a860df8760836227bda31a26c049a885 [file] [log] [blame] [view]
Geoff Lang13e569d2015-06-05 14:33:37 -04001# How to build ANGLE in Chromium for dev
2
3## Introduction
4
5ANGLE 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
9Steps:
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
15cd src/third_party/angle
16gclient config --name . --unmanaged https://chromium.googlesource.com/angle/angle.git
17
18gclient sync
19git checkout master
20```
21
22 * To make the build files run these commands
23
24```bash
25cd src/third_party/angle
26GYP_GENERATORS=ninja gclient runhooks
27```
28
29 * To build
30
31```bash
32cd src/third_party/angle
33ninja -j 10 -k1 -C out/Debug
34```
35
36 * To build a specific target add the target at the end:
37
38```bash
39cd src/third_party/angle
40ninja -j 10 -k1 -C out/Debug angle_compiler_tests
41```
42
43 * To run
44
45```bash
46cd src/third_party/angle
47./out/Debug/angle_compiler_tests
48```
49
50## Working with Top of Tree ANGLE in Chromium
51
52If 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
57solutions = [
58 {
59 # ...
60 u'custom_deps':
61 {
62 "src/third_party/angle": None,
63 },
64 },
65]
66```
67
68You then have full control over your ANGLE workspace and are responsible for running all git commands (pull, rebase, etc.) for managing your branches.
69
70If 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.