OLD | NEW |
1 # What is GN? | 1 # What is GN? |
2 | 2 |
3 GN is a meta-build system that generates | 3 GN is a meta-build system that generates |
4 [NinjaBuild](https://chromium.googlesource.com/chromium/src/+/master/docs/ninja_
build.md) | 4 [NinjaBuild](https://chromium.googlesource.com/chromium/src/+/master/docs/ninja_
build.md) |
5 files. It's meant to be faster and simpler than GYP. It outputs only Ninja build | 5 files so that you can build Chromium with Ninja. |
6 files. | |
7 | 6 |
8 ## Why bother with GN? | 7 ## Why did you switch from GYP? |
9 | 8 |
10 1. We believe GN files are more readable and more maintainable | 9 1. We believe GN files are more readable and more maintainable than GYP files. |
11 than GYP files. | |
12 2. GN is fast: | 10 2. GN is fast: |
13 * GN is 20x faster than GYP. | 11 * GN is 20x faster than GYP. |
14 * GN supports automatically re-running itself as needed by Ninja | 12 * GN supports automatically re-running itself as needed by Ninja |
15 as part of the build. This eliminates the need to remember to | 13 as part of the build. This eliminates the need to remember to |
16 re-run GN when you change a build file. | 14 re-run GN when you change a build file. |
17 3. GN gives us better tools for enforcing dependencies (see | 15 3. GN gives us better tools for enforcing dependencies (see |
18 `gn check` and the `visibility`, `public_deps`, and `data_deps` | 16 `gn check` and the `visibility`, `public_deps`, and `data_deps` |
19 options for some examples). | 17 options for some examples). |
20 4. GN gives us tools for querying the build graph; you can ask | 18 4. GN gives us tools for querying the build graph; you can ask |
21 "what does X depend on" and "who depends on Y", for example. | 19 "what does X depend on" and "who depends on Y", for example. |
22 | 20 |
23 ## What's the status? | 21 ## What's the status of the GYP->GN migration? |
24 | 22 |
25 _as of March 2016:_ | 23 _As of Oct 2016:_ |
26 | 24 |
27 * Linux and Android: Complete but not quite all bots have been flipped. | 25 * All of the Chromium builds have been switched over. |
28 Developers should be using GN on these platforms for most work. | 26 * Nearly all of the GYP files have been deleted from the Chromium repos. |
29 * Windows and ChromeOS: Should be usable for almost all development. Some | 27 * You can no longer build with GYP as a result. |
30 bots need to be flipped. cros_sdk builds don't work on ChromeOS yet. | 28 * There are still some GYP files in place for the "Closure Compilation" |
31 * Mac and iOS: Work is in progress, generally not usable for normal | 29 builders that need to be converted over. |
32 development. | 30 * Some related projects (e.g., V8, Skia) may still support GYP for their |
33 | 31 own reasons. |
34 ## When are you going to be done? | 32 * We're still cleaning up some odds and ends like making gclient not |
35 | 33 still use GYP_DEFINES. |
36 _as of March 2016:_ | |
37 | |
38 We expect most work to be finishing up between now and the end of Q2. | |
39 | |
40 ## What does "done" mean? | |
41 | |
42 Ideally we're done when all of the GYP files have been deleted from | |
43 Chromium and no one misses them. | |
44 | |
45 We will be "mostly" done when the following are true: | |
46 | |
47 * All of the bots maintained by the Chrome infra team for Chromium and | |
48 downstream of Chromium have been switched to GN. (Upstream projects | |
49 like Skia and V8 can choose to stay on GYP if they like). | |
50 * Any developer configurations we care about that don't have bots also | |
51 work (Generally speaking, we're aiming to not have any of these. | |
52 * Configurations we care about should have bots to ensure they don't | |
53 break). We have verified that all of the tests pass. We have | |
54 verified that the command lines match in the above configurations as | |
55 much as possible, and we accept any differences. We have reviewed | |
56 any binary differences that result in the official builds and | |
57 accepted them. The GN files are the "source of truth" for the | |
58 build, and normal chromium developers normally do not need to touch | |
59 GYP files to keep things working. We have replacements for the | |
60 hybrid "msvs-ninja" and "xcode-ninja" configurations that GYP can | |
61 currently build. | |
62 | |
63 The difference between "mostly done" and "done" exists to cover any | |
64 issues we haven't yet identified :) | |
65 | |
66 ## How can I help? | |
67 | |
68 We could especially use infrastructure/bot, Mac, and iOS help. | |
69 | |
70 Or, look at [the list of open bugs](https://code.google.com/p/chromium/issues/li
st?can=2&q=label:Proj-GN-Migration%20-type:Project&sort=pri&colspec=ID%20Pri%20S
ummary%20Type%20OS%20Owner%20Status%20Modified%20Blocking) related to the migrat
ion and see if there's anything that catches your fancy. | |
71 | 34 |
72 ## I want more info on GN! | 35 ## I want more info on GN! |
73 | 36 |
74 Read these links: | 37 Read these links: |
75 | 38 |
76 * [Quick start](https://chromium.googlesource.com/chromium/src/+/master/tools/
gn/docs/quick_start.md) | 39 * [Quick start](https://chromium.googlesource.com/chromium/src/+/master/tools/
gn/docs/quick_start.md) |
77 * [FAQ](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/
faq.md) | 40 * [FAQ](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/
faq.md) |
78 * [GYP conversion cookbook](https://chromium.googlesource.com/chromium/src/+/m
aster/tools/gn/docs/cookbook.md) | 41 * [GYP conversion cookbook](https://chromium.googlesource.com/chromium/src/+/m
aster/tools/gn/docs/cookbook.md) |
79 * [Language and operation details](https://chromium.googlesource.com/chromium/
src/+/master/tools/gn/docs/language.md) | 42 * [Language and operation details](https://chromium.googlesource.com/chromium/
src/+/master/tools/gn/docs/language.md) |
80 * [Reference](https://chromium.googlesource.com/chromium/src/+/master/tools/gn
/docs/reference.md) The built-in `gn help` documentation. | 43 * [Reference](https://chromium.googlesource.com/chromium/src/+/master/tools/gn
/docs/reference.md) The built-in `gn help` documentation. |
81 * [Style guide](https://chromium.googlesource.com/chromium/src/+/master/tools/
gn/docs/style_guide.md) | 44 * [Style guide](https://chromium.googlesource.com/chromium/src/+/master/tools/
gn/docs/style_guide.md) |
82 * [Cross compiling and toolchains](https://chromium.googlesource.com/chromium/
src/+/master/tools/gn/docs/cross_compiles.md) | 45 * [Cross compiling and toolchains](https://chromium.googlesource.com/chromium/
src/+/master/tools/gn/docs/cross_compiles.md) |
83 * [Hacking on GN itself](https://chromium.googlesource.com/chromium/src/+/mast
er/tools/gn/docs/hacking.md) | 46 * [Hacking on GN itself](https://chromium.googlesource.com/chromium/src/+/mast
er/tools/gn/docs/hacking.md) |
84 * [GNStandalone](https://chromium.googlesource.com/chromium/src/+/master/tools
/gn/docs/standalone.md) Standalone GN projects | 47 * [GNStandalone](https://chromium.googlesource.com/chromium/src/+/master/tools
/gn/docs/standalone.md) Standalone GN projects |
85 * [UpdateGNBinaries](https://chromium.googlesource.com/chromium/src/+/master/t
ools/gn/docs/update_binaries.md) Pushing new binaries | 48 * [UpdateGNBinaries](https://chromium.googlesource.com/chromium/src/+/master/t
ools/gn/docs/update_binaries.md) Pushing new binaries |
86 * [Check](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/doc
s/check.md) `gn check` command reference | 49 * [Check](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/doc
s/check.md) `gn check` command reference |
OLD | NEW |