blob: 046b91b57e90af96447041d1bd17f89a9ef526ed [file] [log] [blame] [view]
Geoff Lang13e569d2015-06-05 14:33:37 -04001# How to build ANGLE in Chromium for dev
2
3## Introduction
4
Jamie Madill114e8ef2015-10-19 10:24:02 -04005On Windows, Linux, and Mac ANGLE now builds most core components cross platform, including the shader validator and translator as well as the graphics API translator. These parts can be built and tested inside a Chromium checkout.
Geoff Lang13e569d2015-06-05 14:33:37 -04006
Jamie Madill114e8ef2015-10-19 10:24:02 -04007Steps:
8
9 * Checkout and build [Chromium](http://dev.chromium.org/Home).
10 * You should now be able to use `ninja -C out/Debug angle_end2end_tests`, for example.
11
12## Building Standalone ANGLE insinde Chromium
13
14On Mac, ANGLE doesn't yet include the dEQP tests or the API translation libraries as part of Chromium. ANGLE also includes some sample applications and a few other targets that don't build on Chromium. These steps describe how to build such targets within a Chromium checkout.
Geoff Lang13e569d2015-06-05 14:33:37 -040015
16Steps:
17
18 * Checkout and build [Chromium](http://dev.chromium.org/Home).
19 * To setup run these commands (note similarity to [DevSetup](DevSetup.md)):
20
21```bash
22cd src/third_party/angle
23gclient config --name . --unmanaged https://chromium.googlesource.com/angle/angle.git
24
25gclient sync
26git checkout master
27```
28
29 * To make the build files run these commands
30
31```bash
32cd src/third_party/angle
33GYP_GENERATORS=ninja gclient runhooks
34```
35
36 * To build
37
38```bash
39cd src/third_party/angle
40ninja -j 10 -k1 -C out/Debug
41```
42
43 * To build a specific target add the target at the end:
44
45```bash
46cd src/third_party/angle
Jamie Madill114e8ef2015-10-19 10:24:02 -040047ninja -j 10 -k1 -C out/Debug angle_gles2_deqp_tests
Geoff Lang13e569d2015-06-05 14:33:37 -040048```
49
50 * To run
51
52```bash
53cd src/third_party/angle
Jamie Madill114e8ef2015-10-19 10:24:02 -040054./out/Debug/hello_triangle
Geoff Lang13e569d2015-06-05 14:33:37 -040055```
56
Jamie Madill114e8ef2015-10-19 10:24:02 -040057If you decide to go back to the Chromium-managed version, just remove the `.gclient` file.
58
Geoff Lang13e569d2015-06-05 14:33:37 -040059## Working with Top of Tree ANGLE in Chromium
60
61If 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:
62
63 * Ignore ANGLE in your `.gclient`
64
65```python
66solutions = [
67 {
68 # ...
69 u'custom_deps':
70 {
71 "src/third_party/angle": None,
72 },
73 },
74]
75```
76
77You then have full control over your ANGLE workspace and are responsible for running all git commands (pull, rebase, etc.) for managing your branches.
78
79If you decide you need to go back to the DEPS version of ANGLE:
Geoff Lang9534a8f2015-07-13 17:05:31 -040080
Geoff Lang13e569d2015-06-05 14:33:37 -040081 * Comment out the `src/third_party/angle` line in your `custom_deps`.
82 * Go into your ANGLE workspace and switch back to the master branch (ensure there are no modified or new files).
83 * `gclient sync` your Chromium workspace.