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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 ] | 241 ] |
242 all_dependent_configs = [ | 242 all_dependent_configs = [ |
243 ":hello_config" | 243 ":hello_config" |
244 ] | 244 ] |
245 } | 245 } |
246 ``` | 246 ``` |
247 | 247 |
248 This applies the `hello_config` to the `hello` target itself, plus all | 248 This applies the `hello_config` to the `hello` target itself, plus all |
249 targets that depend on transitively depend on the current one. Now | 249 targets that depend on transitively depend on the current one. Now |
250 everybody that depends on us will get our settings. You can also set | 250 everybody that depends on us will get our settings. You can also set |
251 `direct_dependent_configs` which applies only to targets that directly | 251 `public_configs` which applies only to targets that directly |
252 depend on your target (not transitively). | 252 depend on your target (not transitively). |
253 | 253 |
254 Now if you compile and run, you'll see the new version with two people: | 254 Now if you compile and run, you'll see the new version with two people: |
255 | 255 |
256 ``` | 256 ``` |
257 > ninja -C out/Default say_hello | 257 > ninja -C out/Default say_hello |
258 ninja: Entering directory 'out/Default' | 258 ninja: Entering directory 'out/Default' |
259 [1/1] Regenerating ninja files | 259 [1/1] Regenerating ninja files |
260 [4/4] LINK say_hello | 260 [4/4] LINK say_hello |
261 > out/Default/say_hello | 261 > out/Default/say_hello |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 line flag. This will output a summary of timings for various things. | 320 line flag. This will output a summary of timings for various things. |
321 | 321 |
322 You can also make a trace of how the build files were executed: | 322 You can also make a trace of how the build files were executed: |
323 | 323 |
324 ``` | 324 ``` |
325 gn --tracelog=mylog.trace | 325 gn --tracelog=mylog.trace |
326 ``` | 326 ``` |
327 | 327 |
328 and you can load the resulting file in Chrome's `about:tracing` page to | 328 and you can load the resulting file in Chrome's `about:tracing` page to |
329 look at everything. | 329 look at everything. |
OLD | NEW |