| OLD | NEW |
| 1 # GN Reference | 1 # GN Reference |
| 2 | 2 |
| 3 *This page is automatically generated from* `gn help --markdown all`. | 3 *This page is automatically generated from* `gn help --markdown all`. |
| 4 | 4 |
| 5 ## **\--args**: Specifies build arguments overrides. | 5 ## **\--args**: Specifies build arguments overrides. |
| 6 | 6 |
| 7 ``` | 7 ``` |
| 8 See "gn help buildargs" for an overview of how build arguments work. | 8 See "gn help buildargs" for an overview of how build arguments work. |
| 9 | 9 |
| 10 Most operations take a build directory. The build arguments are taken | 10 Most operations take a build directory. The build arguments are taken |
| (...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1424 match the value of the "root_gen_dir" variable when inside that | 1424 match the value of the "root_gen_dir" variable when inside that |
| 1425 target's declaration. | 1425 target's declaration. |
| 1426 | 1426 |
| 1427 "target_out_dir | 1427 "target_out_dir |
| 1428 The output directory for the target. This will match the | 1428 The output directory for the target. This will match the |
| 1429 value of the "target_out_dir" variable when inside that target's | 1429 value of the "target_out_dir" variable when inside that target's |
| 1430 declaration. | 1430 declaration. |
| 1431 | 1431 |
| 1432 "root_out_dir" | 1432 "root_out_dir" |
| 1433 The root of the output file tree for the target. This will | 1433 The root of the output file tree for the target. This will |
| 1434 match the value of the "root_gen_dir" variable when inside that | 1434 match the value of the "root_out_dir" variable when inside that |
| 1435 target's declaration. | 1435 target's declaration. |
| 1436 | 1436 |
| 1437 "label_no_toolchain" | 1437 "label_no_toolchain" |
| 1438 The fully qualified version of this label, not including the | 1438 The fully qualified version of this label, not including the |
| 1439 toolchain. For the input ":bar" it might return | 1439 toolchain. For the input ":bar" it might return |
| 1440 "//foo:bar". | 1440 "//foo:bar". |
| 1441 | 1441 |
| 1442 "label_with_toolchain" | 1442 "label_with_toolchain" |
| 1443 The fully qualified version of this label, including the | 1443 The fully qualified version of this label, including the |
| 1444 toolchain. For the input ":bar" it might return | 1444 toolchain. For the input ":bar" it might return |
| (...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3299 | 3299 |
| 3300 ``` | 3300 ``` |
| 3301 For action and action_foreach targets, args is the list of arguments | 3301 For action and action_foreach targets, args is the list of arguments |
| 3302 to pass to the script. Typically you would use source expansion (see | 3302 to pass to the script. Typically you would use source expansion (see |
| 3303 "gn help source_expansion") to insert the source file names. | 3303 "gn help source_expansion") to insert the source file names. |
| 3304 | 3304 |
| 3305 See also "gn help action" and "gn help action_foreach". | 3305 See also "gn help action" and "gn help action_foreach". |
| 3306 | 3306 |
| 3307 | 3307 |
| 3308 ``` | 3308 ``` |
| 3309 ## **asmflags**: Flags passed to the assembler. |
| 3310 |
| 3311 ``` |
| 3312 A list of strings. |
| 3313 |
| 3314 "asmflags" are passed to any invocation of a tool that takes an |
| 3315 .asm or .S file as input. |
| 3316 |
| 3317 ``` |
| 3318 |
| 3319 ### **Ordering of flags and values** |
| 3320 |
| 3321 ``` |
| 3322 1. Those set on the current target (not in a config). |
| 3323 2. Those set on the "configs" on the target in order that the |
| 3324 configs appear in the list. |
| 3325 3. Those set on the "all_dependent_configs" on the target in order |
| 3326 that the configs appear in the list. |
| 3327 4. Those set on the "public_configs" on the target in order that |
| 3328 those configs appear in the list. |
| 3329 5. all_dependent_configs pulled from dependencies, in the order of |
| 3330 the "deps" list. This is done recursively. If a config appears |
| 3331 more than once, only the first occurance will be used. |
| 3332 6. public_configs pulled from dependencies, in the order of the |
| 3333 "deps" list. If a dependency is public, they will be applied |
| 3334 recursively. |
| 3335 |
| 3336 |
| 3337 ``` |
| 3309 ## **cflags***: Flags passed to the C compiler. | 3338 ## **cflags***: Flags passed to the C compiler. |
| 3310 | 3339 |
| 3311 ``` | 3340 ``` |
| 3312 A list of strings. | 3341 A list of strings. |
| 3313 | 3342 |
| 3314 "cflags" are passed to all invocations of the C, C++, Objective C, | 3343 "cflags" are passed to all invocations of the C, C++, Objective C, |
| 3315 and Objective C++ compilers. | 3344 and Objective C++ compilers. |
| 3316 | 3345 |
| 3317 To target one of these variants individually, use "cflags_c", | 3346 To target one of these variants individually, use "cflags_c", |
| 3318 "cflags_cc", "cflags_objc", and "cflags_objcc", | 3347 "cflags_cc", "cflags_objc", and "cflags_objcc", |
| 3319 respectively. | 3348 respectively. These variant-specific versions of cflags* will be |
| 3349 appended on the compiler command line after "cflags". |
| 3320 | 3350 |
| 3321 These variant-specific versions of cflags* will be appended to the | 3351 See also "asmflags" for flags for assembly-language files. |
| 3322 "cflags". | |
| 3323 | 3352 |
| 3324 ``` | 3353 ``` |
| 3325 | 3354 |
| 3326 ### **Ordering of flags and values** | 3355 ### **Ordering of flags and values** |
| 3327 | 3356 |
| 3328 ``` | 3357 ``` |
| 3329 1. Those set on the current target (not in a config). | 3358 1. Those set on the current target (not in a config). |
| 3330 2. Those set on the "configs" on the target in order that the | 3359 2. Those set on the "configs" on the target in order that the |
| 3331 configs appear in the list. | 3360 configs appear in the list. |
| 3332 3. Those set on the "all_dependent_configs" on the target in order | 3361 3. Those set on the "all_dependent_configs" on the target in order |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3345 ## **cflags***: Flags passed to the C compiler. | 3374 ## **cflags***: Flags passed to the C compiler. |
| 3346 | 3375 |
| 3347 ``` | 3376 ``` |
| 3348 A list of strings. | 3377 A list of strings. |
| 3349 | 3378 |
| 3350 "cflags" are passed to all invocations of the C, C++, Objective C, | 3379 "cflags" are passed to all invocations of the C, C++, Objective C, |
| 3351 and Objective C++ compilers. | 3380 and Objective C++ compilers. |
| 3352 | 3381 |
| 3353 To target one of these variants individually, use "cflags_c", | 3382 To target one of these variants individually, use "cflags_c", |
| 3354 "cflags_cc", "cflags_objc", and "cflags_objcc", | 3383 "cflags_cc", "cflags_objc", and "cflags_objcc", |
| 3355 respectively. | 3384 respectively. These variant-specific versions of cflags* will be |
| 3385 appended on the compiler command line after "cflags". |
| 3356 | 3386 |
| 3357 These variant-specific versions of cflags* will be appended to the | 3387 See also "asmflags" for flags for assembly-language files. |
| 3358 "cflags". | |
| 3359 | 3388 |
| 3360 ``` | 3389 ``` |
| 3361 | 3390 |
| 3362 ### **Ordering of flags and values** | 3391 ### **Ordering of flags and values** |
| 3363 | 3392 |
| 3364 ``` | 3393 ``` |
| 3365 1. Those set on the current target (not in a config). | 3394 1. Those set on the current target (not in a config). |
| 3366 2. Those set on the "configs" on the target in order that the | 3395 2. Those set on the "configs" on the target in order that the |
| 3367 configs appear in the list. | 3396 configs appear in the list. |
| 3368 3. Those set on the "all_dependent_configs" on the target in order | 3397 3. Those set on the "all_dependent_configs" on the target in order |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3381 ## **cflags***: Flags passed to the C compiler. | 3410 ## **cflags***: Flags passed to the C compiler. |
| 3382 | 3411 |
| 3383 ``` | 3412 ``` |
| 3384 A list of strings. | 3413 A list of strings. |
| 3385 | 3414 |
| 3386 "cflags" are passed to all invocations of the C, C++, Objective C, | 3415 "cflags" are passed to all invocations of the C, C++, Objective C, |
| 3387 and Objective C++ compilers. | 3416 and Objective C++ compilers. |
| 3388 | 3417 |
| 3389 To target one of these variants individually, use "cflags_c", | 3418 To target one of these variants individually, use "cflags_c", |
| 3390 "cflags_cc", "cflags_objc", and "cflags_objcc", | 3419 "cflags_cc", "cflags_objc", and "cflags_objcc", |
| 3391 respectively. | 3420 respectively. These variant-specific versions of cflags* will be |
| 3421 appended on the compiler command line after "cflags". |
| 3392 | 3422 |
| 3393 These variant-specific versions of cflags* will be appended to the | 3423 See also "asmflags" for flags for assembly-language files. |
| 3394 "cflags". | |
| 3395 | 3424 |
| 3396 ``` | 3425 ``` |
| 3397 | 3426 |
| 3398 ### **Ordering of flags and values** | 3427 ### **Ordering of flags and values** |
| 3399 | 3428 |
| 3400 ``` | 3429 ``` |
| 3401 1. Those set on the current target (not in a config). | 3430 1. Those set on the current target (not in a config). |
| 3402 2. Those set on the "configs" on the target in order that the | 3431 2. Those set on the "configs" on the target in order that the |
| 3403 configs appear in the list. | 3432 configs appear in the list. |
| 3404 3. Those set on the "all_dependent_configs" on the target in order | 3433 3. Those set on the "all_dependent_configs" on the target in order |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3417 ## **cflags***: Flags passed to the C compiler. | 3446 ## **cflags***: Flags passed to the C compiler. |
| 3418 | 3447 |
| 3419 ``` | 3448 ``` |
| 3420 A list of strings. | 3449 A list of strings. |
| 3421 | 3450 |
| 3422 "cflags" are passed to all invocations of the C, C++, Objective C, | 3451 "cflags" are passed to all invocations of the C, C++, Objective C, |
| 3423 and Objective C++ compilers. | 3452 and Objective C++ compilers. |
| 3424 | 3453 |
| 3425 To target one of these variants individually, use "cflags_c", | 3454 To target one of these variants individually, use "cflags_c", |
| 3426 "cflags_cc", "cflags_objc", and "cflags_objcc", | 3455 "cflags_cc", "cflags_objc", and "cflags_objcc", |
| 3427 respectively. | 3456 respectively. These variant-specific versions of cflags* will be |
| 3457 appended on the compiler command line after "cflags". |
| 3428 | 3458 |
| 3429 These variant-specific versions of cflags* will be appended to the | 3459 See also "asmflags" for flags for assembly-language files. |
| 3430 "cflags". | |
| 3431 | 3460 |
| 3432 ``` | 3461 ``` |
| 3433 | 3462 |
| 3434 ### **Ordering of flags and values** | 3463 ### **Ordering of flags and values** |
| 3435 | 3464 |
| 3436 ``` | 3465 ``` |
| 3437 1. Those set on the current target (not in a config). | 3466 1. Those set on the current target (not in a config). |
| 3438 2. Those set on the "configs" on the target in order that the | 3467 2. Those set on the "configs" on the target in order that the |
| 3439 configs appear in the list. | 3468 configs appear in the list. |
| 3440 3. Those set on the "all_dependent_configs" on the target in order | 3469 3. Those set on the "all_dependent_configs" on the target in order |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3453 ## **cflags***: Flags passed to the C compiler. | 3482 ## **cflags***: Flags passed to the C compiler. |
| 3454 | 3483 |
| 3455 ``` | 3484 ``` |
| 3456 A list of strings. | 3485 A list of strings. |
| 3457 | 3486 |
| 3458 "cflags" are passed to all invocations of the C, C++, Objective C, | 3487 "cflags" are passed to all invocations of the C, C++, Objective C, |
| 3459 and Objective C++ compilers. | 3488 and Objective C++ compilers. |
| 3460 | 3489 |
| 3461 To target one of these variants individually, use "cflags_c", | 3490 To target one of these variants individually, use "cflags_c", |
| 3462 "cflags_cc", "cflags_objc", and "cflags_objcc", | 3491 "cflags_cc", "cflags_objc", and "cflags_objcc", |
| 3463 respectively. | 3492 respectively. These variant-specific versions of cflags* will be |
| 3493 appended on the compiler command line after "cflags". |
| 3464 | 3494 |
| 3465 These variant-specific versions of cflags* will be appended to the | 3495 See also "asmflags" for flags for assembly-language files. |
| 3466 "cflags". | |
| 3467 | 3496 |
| 3468 ``` | 3497 ``` |
| 3469 | 3498 |
| 3470 ### **Ordering of flags and values** | 3499 ### **Ordering of flags and values** |
| 3471 | 3500 |
| 3472 ``` | 3501 ``` |
| 3473 1. Those set on the current target (not in a config). | 3502 1. Those set on the current target (not in a config). |
| 3474 2. Those set on the "configs" on the target in order that the | 3503 2. Those set on the "configs" on the target in order that the |
| 3475 configs appear in the list. | 3504 configs appear in the list. |
| 3476 3. Those set on the "all_dependent_configs" on the target in order | 3505 3. Those set on the "all_dependent_configs" on the target in order |
| (...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5176 ** -q**: Quiet mode. Don't print output on success. | 5205 ** -q**: Quiet mode. Don't print output on success. |
| 5177 ** \--root**: Explicitly specify source root. | 5206 ** \--root**: Explicitly specify source root. |
| 5178 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. | 5207 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. |
| 5179 ** \--threads**: Specify number of worker threads. | 5208 ** \--threads**: Specify number of worker threads. |
| 5180 ** \--time**: Outputs a summary of how long everything took. | 5209 ** \--time**: Outputs a summary of how long everything took. |
| 5181 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. | 5210 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. |
| 5182 ** -v**: Verbose logging. | 5211 ** -v**: Verbose logging. |
| 5183 ** \--version**: Prints the GN version number and exits. | 5212 ** \--version**: Prints the GN version number and exits. |
| 5184 | 5213 |
| 5185 ``` | 5214 ``` |
| OLD | NEW |