Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: tools/gn/docs/standalone.md

Issue 1052883002: migrate GN docs from the wiki to the repo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split md_browser out into its own dir Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/docs/quick_start.md ('k') | tools/gn/docs/style_guide.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Introduction
2
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.
5
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
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
10 much more explicit and there is less flexibility in how things are
11 configured.
12
13 # What you need for a minimal GN build
14
15 Requirements:
16
17 * A master build config file. Chrome's is `//build/config/BUILDCONFIG.gn`
18 * A separate build file for the toolchain definition. It's not a good idea
19 to put these in a BUILD.gn file shared with any target definitions for
20 complex reasons. Chrome's are in `//build/toolchain/<platform>/BUILD.gn`.
21 * A `BUILD.gn` file in the root directory. This will be loaded after the
22 build config file to start the build.
23
24 You may want a `.gn` file in the root directory. When you run GN it
25 recursively looks up the directory tree until it finds this file, and it
26 treats the containing directory as the "source root". This file also
27 defines the location of the master build config file:
28
29 * See Chrome's `src/.gn` file.
30 * Unlike Chrome, you probably don't need to define a secondary root.
31 * see `gn help dotfile` for more.
32
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
35 your subproject rather than for all of Chrome. This could be an
36 advantage or a disadvantage.
37
38 If you would rather avoid using this file, you can use the command-line
39 flags `--root` and `--dotfile` to set these values.
40
41 # How the standalone and Chrome builds interact
Nico 2017/03/20 14:19:24 This looks truncated. Pasteboard mishap? (I notic
OLDNEW
« no previous file with comments | « tools/gn/docs/quick_start.md ('k') | tools/gn/docs/style_guide.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698