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](/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. It's meant to be faster and simpler than GYP. It outputs only Ninja build |
6 files. | 6 files. |
7 | 7 |
8 ## Why bother with GN? | 8 ## Why bother with GN? |
9 | 9 |
10 1. We believe GN files are more readable and more maintainable | 10 1. We believe GN files are more readable and more maintainable |
11 than GYP files. | 11 than GYP files. |
12 2. GN is fast: | 12 2. GN is fast: |
13 * GN is 20x faster than GYP (as of mid November, building 80% | 13 * GN is 20x faster than GYP. |
14 of what GYP builds, in one configuration rather than two, takes 500ms | |
15 on a z620 running Ubuntu Trusty. GYP takes 20 seconds. | |
16 We see similar speedups on Mac and Windows). | |
17 * GN supports automatically re-running itself as needed by Ninja | 14 * GN supports automatically re-running itself as needed by Ninja |
18 as part of the build. This eliminates the need to remember to | 15 as part of the build. This eliminates the need to remember to |
19 re-run GN when you change a build file. | 16 re-run GN when you change a build file. |
20 3. GN gives us better tools for enforcing dependencies (see | 17 3. GN gives us better tools for enforcing dependencies (see |
21 `gn check` and the `visibility`, `public_deps`, and `data_deps` | 18 `gn check` and the `visibility`, `public_deps`, and `data_deps` |
22 options for some examples). | 19 options for some examples). |
23 4. GN gives us tools for querying the build graph; you can ask | 20 4. GN gives us tools for querying the build graph; you can ask |
24 "what does X depend on" and "who depends on Y", for example. | 21 "what does X depend on" and "who depends on Y", for example. |
25 | 22 |
26 ## What's the status? | 23 ## What's the status? |
27 | 24 |
28 _as of 8 Feb 2015:_ | 25 _as of 7 Oct 2015:_ |
29 | 26 |
30 Chrome and most of the major test suites link on Linux and ChromeOS. | 27 GN is now the default system for Linux, though GYP still works. It |
31 There's probably <1000 objects left to build, in a few test suites and a | 28 is mostly complete on Android, ChromeOS, and Windows (apart from NaCl |
32 bunch of utillities and helper binaries. We will probably have | 29 support on Windows). |
33 everything converted in another couple weeks. | |
34 | 30 |
35 Chrome also links on Android and Windows, and bringing up the remaining | 31 Mac and iOS are making progress, though we still need better support |
36 test suites should be mostly straightforward. There's some work left to | 32 for bundles before the major targets like Chrome can link and they get |
37 enable NaCl on Windows but it should also be straightforward. | 33 to parity w/ the other platforms. |
38 | |
39 Mac and iOS have not progressed much as attention has been focused on | |
40 Linux and Windows; we still need support for bundles and frameworks | |
41 before it can get to parity w/ the other platforms. | |
42 | 34 |
43 ## When are you going to be done? | 35 ## When are you going to be done? |
44 | 36 |
45 _as of 8 Feb 2015:_ | 37 _as of 7 Oct 2015:_ |
46 | 38 |
47 We're currently shooting for having the main developer configurations | 39 We're currently shooting for having Android, ChromeOS, and Windows |
48 working and usable by the end of March 2015. There will probably be a | 40 converted over by the end of 2015, with Mac and iOS following in Q1 |
49 fair amount of verification of flags, bug fixes, etc over the next | 41 of 2016. |
50 couple months, but hopefully we will be flipping configurations from GYP | |
51 to GN throughout Q2, targeting having everything done by the end of Q2. | |
52 | 42 |
53 ## What does "done" mean? | 43 ## What does "done" mean? |
54 | 44 |
55 Ideally we're done when all of the GYP files have been deleted from | 45 Ideally we're done when all of the GYP files have been deleted from |
56 Chromium and no one misses them. | 46 Chromium and no one misses them. |
57 | 47 |
58 We will be "mostly" done when the following are true: | 48 We will be "mostly" done when the following are true: |
59 | 49 |
60 * All of the bots maintained by the Chrome infra team for Chromium and | 50 * All of the bots maintained by the Chrome infra team for Chromium and |
61 downstream of Chromium have been switched to GN. (Upstream projects | 51 downstream of Chromium have been switched to GN. (Upstream projects |
(...skipping 16 matching lines...) Expand all Loading... |
78 | 68 |
79 We do not currently plan to support full native XCode or Visual Studio | 69 We do not currently plan to support full native XCode or Visual Studio |
80 generation from GN. It is theoretically possible to support such things, | 70 generation from GN. It is theoretically possible to support such things, |
81 so we would at least look at patches adding the functionality. | 71 so we would at least look at patches adding the functionality. |
82 | 72 |
83 ## How can I help? | 73 ## How can I help? |
84 | 74 |
85 Check to see if your targets build under GN yet. If they don't, | 75 Check to see if your targets build under GN yet. If they don't, |
86 volunteer to help convert them! | 76 volunteer to help convert them! |
87 | 77 |
88 _17 Nov 2014. We are updating the stuff we use to track progress. Watch | 78 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. |
89 this space and chromium-dev@ for more info!_. | |
90 | 79 |
91 ## I want more info on GN! | 80 ## I want more info on GN! |
92 | 81 |
93 Read these links: | 82 Read these links: |
94 | 83 |
95 * [Quick start](docs/quick_start.md) | 84 * [Quick start](/chromium/src/+/master/tools/gn/docs/quick_start.md) |
96 * [FAQ](docs/faq.md) | 85 * [FAQ](/chromium/src/+/master/tools/gn/docs/faq.md) |
97 * [GYP conversion cookbook](docs/cookbook.md) | 86 * [GYP conversion cookbook](/chromium/src/+/master/tools/gn/docs/cookbook.md) |
98 * [Language and operation details](docs/language.md) | 87 * [Language and operation details](/chromium/src/+/master/tools/gn/docs/langua
ge.md) |
99 * [Reference](docs/reference.md) The built-in `gn help` documentation. | 88 * [Reference](/chromium/src/+/master/tools/gn/docs/reference.md) The built-in
`gn help` documentation. |
100 * [Style guide](docs/style_guide.md) | 89 * [Style guide](/chromium/src/+/master/tools/gn/docs/style_guide.md) |
101 * [Cross compiling and toolchains](docs/cross_compiles.md) | 90 * [Cross compiling and toolchains](/chromium/src/+/master/tools/gn/docs/cross_
compiles.md) |
102 * [Hacking on GN itself](docs/hacking.md) | 91 * [Hacking on GN itself](/chromium/src/+/master/tools/gn/docs/hacking.md) |
103 * [GNStandalone](docs/standalone.md) Standalone GN projects | 92 * [GNStandalone](/chromium/src/+/master/tools/gn/docs/standalone.md) Standalon
e GN projects |
104 * [UpdateGNBinaries](docs/update_binaries.md) Pushing new binaries | 93 * [UpdateGNBinaries](/chromium/src/+/master/tools/gn/docs/update_binaries.md)
Pushing new binaries |
105 * [Check](docs/check.md) `gn check` command reference | 94 * [Check](/chromium/src/+/master/tools/gn/docs/check.md) `gn check` command re
ference |
OLD | NEW |