OLD | NEW |
---|---|
1 # GN Quick Start guide | 1 # GN Quick Start guide |
2 | 2 |
3 [TOC] | 3 [TOC] |
4 | 4 |
5 ## Running GN | 5 ## Running GN |
6 | 6 |
7 You just run `gn` from the command line. There is a script in | 7 You just run `gn` from the command line. There is a script in |
8 depot\_tools (which is presumably on your path) with this name. The | 8 depot\_tools (which is presumably on your path) with this name. The |
9 script will find the binary in the source tree containing the current | 9 script will find the binary in the source tree containing the current |
10 directory and run it. | 10 directory and run it. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 | 43 |
44 ``` | 44 ``` |
45 gn args --list out/my_build | 45 gn args --list out/my_build |
46 ``` | 46 ``` |
47 | 47 |
48 on the command line. See "Taking build arguments" below for information | 48 on the command line. See "Taking build arguments" below for information |
49 on how to use these in your code. (Note that you have to specify the | 49 on how to use these in your code. (Note that you have to specify the |
50 build directory for this command because the available arguments can | 50 build directory for this command because the available arguments can |
51 change according to what's set. | 51 change according to what's set. |
52 | 52 |
53 ## Cross-compiling to a target OS or architecture | |
54 | |
55 Run `gn args out/Default` (substituting your build directory as needed) and | |
56 add one or more of the following lines for common cross-compiling options. | |
57 | |
58 ``` | |
59 target_os="chromeos" | |
brettw
2015/06/19 17:47:06
Can you put spaces on each side of the = in these
dmazzoni
2015/07/16 19:30:02
Done.
| |
60 target_os="android" | |
61 | |
62 target_cpu="arm" | |
63 target_cpu="x86" | |
64 target_cpu="x64" | |
65 ``` | |
66 | |
67 See [GNCrossCompiles](cross_compiles.md) for more info. | |
68 | |
53 ## Configuring goma | 69 ## Configuring goma |
54 | 70 |
55 | 71 |
56 Run `gn args out/Default` (substituting your build directory as needed). | 72 Run `gn args out/Default` (substituting your build directory as needed). |
57 Add: | 73 Add: |
58 | 74 |
59 ``` | 75 ``` |
60 use_goma = true | 76 use_goma = true |
61 goma_dir = "~/foo/bar/goma" | 77 goma_dir = "~/foo/bar/goma" |
62 ``` | 78 ``` |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
320 line flag. This will output a summary of timings for various things. | 336 line flag. This will output a summary of timings for various things. |
321 | 337 |
322 You can also make a trace of how the build files were executed: | 338 You can also make a trace of how the build files were executed: |
323 | 339 |
324 ``` | 340 ``` |
325 gn --tracelog=mylog.trace | 341 gn --tracelog=mylog.trace |
326 ``` | 342 ``` |
327 | 343 |
328 and you can load the resulting file in Chrome's `about:tracing` page to | 344 and you can load the resulting file in Chrome's `about:tracing` page to |
329 look at everything. | 345 look at everything. |
OLD | NEW |