| OLD | NEW |
| 1 # Introduction | 1 # Introduction |
| 2 | 2 |
| 3 This page is about how to design a project that can build independently | 3 This page is about how to design a project that can build independently |
| 4 with GN but also be brought into the Chrome build. | 4 with GN but also be brought into the Chrome build. |
| 5 | 5 |
| 6 GN is in principle no different than GYP in that there is some core | 6 GN is in principle no different than GYP in that there is some core |
| 7 configuration that must be the same between both the standalone build | 7 configuration that must be the same between both the standalone build |
| 8 and the Chrome build. However, GN is much more explicit in its naming | 8 and the Chrome build. However, GN is much more explicit in its naming |
| 9 and configuration, so the similarities between the two builds are also | 9 and configuration, so the similarities between the two builds are also |
| 10 much more explicit and there is less flexibility in how things are | 10 much more explicit and there is less flexibility in how things are |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 * See Chrome's `src/.gn` file. | 29 * See Chrome's `src/.gn` file. |
| 30 * Unlike Chrome, you probably don't need to define a secondary root. | 30 * Unlike Chrome, you probably don't need to define a secondary root. |
| 31 * see `gn help dotfile` for more. | 31 * see `gn help dotfile` for more. |
| 32 | 32 |
| 33 Adding a `.gn` file in a repository that is pulled into Chrome means | 33 Adding a `.gn` file in a repository that is pulled into Chrome means |
| 34 that then running GN in your subdirectory will configure a build for | 34 that then running GN in your subdirectory will configure a build for |
| 35 your subproject rather than for all of Chrome. This could be an | 35 your subproject rather than for all of Chrome. This could be an |
| 36 advantage or a disadvantage. | 36 advantage or a disadvantage. |
| 37 | 37 |
| 38 If you would rather avoid using this file, you can use the command-line | 38 If you are in a directory with such a file and you want to not use it |
| 39 flags `--root` and `--dotfile` to set these values. | 39 (e.g., to do the full Chrome build instead), you can use the command-line |
| 40 flags `--root` and `--dotfile` to set the values you want. |
| 40 | 41 |
| 41 # How the standalone and Chrome builds interact | 42 If you want a completely standalone build that has nothing to do w/ Chrome |
| 43 and doesn't use Chrome's //build files, you can look at an example in |
| 44 [//tools/gn/example](../example). |
| OLD | NEW |