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