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

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

Issue 2211593002: Cleanup references to concurrent_links in gn binary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@concurrent_links
Patch Set: Fix unittests. Created 4 years, 4 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 | « no previous file | tools/gn/function_toolchain.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 2015
2016 The result will never end in a slash, so if the resulting 2016 The result will never end in a slash, so if the resulting
2017 is empty, the system ("/") or source ("//") roots, a "." 2017 is empty, the system ("/") or source ("//") roots, a "."
2018 will be appended such that it is always legal to append a slash 2018 will be appended such that it is always legal to append a slash
2019 and a filename and get a valid path. 2019 and a filename and get a valid path.
2020 2020
2021 "out_dir" 2021 "out_dir"
2022 The output file directory corresponding to the path of the 2022 The output file directory corresponding to the path of the
2023 given file, not including a trailing slash. 2023 given file, not including a trailing slash.
2024 "//foo/bar/baz.txt" => "//out/Default/obj/foo/bar" 2024 "//foo/bar/baz.txt" => "//out/Default/obj/foo/bar"
2025
2025 "gen_dir" 2026 "gen_dir"
2026 The generated file directory corresponding to the path of the 2027 The generated file directory corresponding to the path of the
2027 given file, not including a trailing slash. 2028 given file, not including a trailing slash.
2028 "//foo/bar/baz.txt" => "//out/Default/gen/foo/bar" 2029 "//foo/bar/baz.txt" => "//out/Default/gen/foo/bar"
2029 2030
2030 "abspath" 2031 "abspath"
2031 The full absolute path name to the file or directory. It will be 2032 The full absolute path name to the file or directory. It will be
2032 resolved relative to the current directory, and then the source- 2033 resolved relative to the current directory, and then the source-
2033 absolute version will be returned. If the input is system- 2034 absolute version will be returned. If the input is system-
2034 absolute, the same input will be returned. 2035 absolute, the same input will be returned.
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
3430 dependencies these must be targets defined in another toolchain. 3431 dependencies these must be targets defined in another toolchain.
3431 3432
3432 This is expressed as a list of targets, and generally these targets 3433 This is expressed as a list of targets, and generally these targets
3433 will always specify a toolchain: 3434 will always specify a toolchain:
3434 deps = [ "//foo/bar:baz(//build/toolchain:bootstrap)" ] 3435 deps = [ "//foo/bar:baz(//build/toolchain:bootstrap)" ]
3435 3436
3436 This concept is somewhat inefficient to express in Ninja (it 3437 This concept is somewhat inefficient to express in Ninja (it
3437 requires a lot of duplicate of rules) so should only be used when 3438 requires a lot of duplicate of rules) so should only be used when
3438 absolutely necessary. 3439 absolutely necessary.
3439 3440
3440 concurrent_links
3441 In integer expressing the number of links that Ninja will perform in
3442 parallel. GN will create a pool for shared library and executable
3443 link steps with this many processes. Since linking is memory- and
3444 I/O-intensive, projects with many large targets may want to limit
3445 the number of parallel steps to avoid overloading the computer.
3446 Since creating static libraries is generally not as intensive
3447 there is no limit to "alink" steps.
3448
3449 Defaults to 0 which Ninja interprets as "no limit".
3450
3451 The value used will be the one from the default toolchain of the
3452 current build.
3453
3454 ``` 3441 ```
3455 3442
3456 ### **Invoking targets in toolchains**: 3443 ### **Invoking targets in toolchains**:
3457 3444
3458 ``` 3445 ```
3459 By default, when a target depends on another, there is an implicit 3446 By default, when a target depends on another, there is an implicit
3460 toolchain label that is inherited, so the dependee has the same one 3447 toolchain label that is inherited, so the dependee has the same one
3461 as the dependent. 3448 as the dependent.
3462 3449
3463 You can override this and refer to any other toolchain by explicitly 3450 You can override this and refer to any other toolchain by explicitly
(...skipping 10 matching lines...) Expand all
3474 arguments specified by the toolchain_args section of the toolchain 3461 arguments specified by the toolchain_args section of the toolchain
3475 definition (see "gn help toolchain_args"). 3462 definition (see "gn help toolchain_args").
3476 3. Loads the destination build file in the context of the 3463 3. Loads the destination build file in the context of the
3477 configuration file in the previous step. 3464 configuration file in the previous step.
3478 3465
3479 ``` 3466 ```
3480 3467
3481 ### **Example**: 3468 ### **Example**:
3482 ``` 3469 ```
3483 toolchain("plugin_toolchain") { 3470 toolchain("plugin_toolchain") {
3484 concurrent_links = 8
3485
3486 tool("cc") { 3471 tool("cc") {
3487 command = "gcc {{source}}" 3472 command = "gcc {{source}}"
3488 ... 3473 ...
3489 } 3474 }
3490 3475
3491 toolchain_args() { 3476 toolchain_args() {
3492 is_plugin = true 3477 is_plugin = true
3493 is_32bit = true 3478 is_32bit = true
3494 is_64bit = false 3479 is_64bit = false
3495 } 3480 }
(...skipping 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after
6336 ** \--root**: Explicitly specify source root. 6321 ** \--root**: Explicitly specify source root.
6337 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. 6322 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file.
6338 ** \--script-executable**: Set the executable used to execute scripts. 6323 ** \--script-executable**: Set the executable used to execute scripts.
6339 ** \--threads**: Specify number of worker threads. 6324 ** \--threads**: Specify number of worker threads.
6340 ** \--time**: Outputs a summary of how long everything took. 6325 ** \--time**: Outputs a summary of how long everything took.
6341 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. 6326 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file.
6342 ** -v**: Verbose logging. 6327 ** -v**: Verbose logging.
6343 ** \--version**: Prints the GN version number and exits. 6328 ** \--version**: Prints the GN version number and exits.
6344 6329
6345 ``` 6330 ```
OLDNEW
« no previous file with comments | « no previous file | tools/gn/function_toolchain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698