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

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

Issue 1690843002: gn: Add runtime_link_output to tool("solib") (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: e Created 4 years, 10 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 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2479 are relative to the build output directory. There must always be 2479 are relative to the build output directory. There must always be
2480 at least one output file. There can be more than one output (a 2480 at least one output file. There can be more than one output (a
2481 linker might produce a library and an import library, for 2481 linker might produce a library and an import library, for
2482 example). 2482 example).
2483 2483
2484 This array just declares to GN what files the tool will 2484 This array just declares to GN what files the tool will
2485 produce. It is your responsibility to specify the tool command 2485 produce. It is your responsibility to specify the tool command
2486 that actually produces these files. 2486 that actually produces these files.
2487 2487
2488 If you specify more than one output for shared library links, 2488 If you specify more than one output for shared library links,
2489 you should consider setting link_output and depend_output. 2489 you should consider setting link_output, depend_output, and
2490 Otherwise, the first entry in the outputs list should always be 2490 runtime_link_output. Otherwise, the first entry in the
2491 the main output which will be linked to. 2491 outputs list should always be the main output which will be
2492 linked to.
2492 2493
2493 Example for a compiler tool that produces .obj files: 2494 Example for a compiler tool that produces .obj files:
2494 outputs = [ 2495 outputs = [
2495 "{{source_out_dir}}/{{source_name_part}}.obj" 2496 "{{source_out_dir}}/{{source_name_part}}.obj"
2496 ] 2497 ]
2497 2498
2498 Example for a linker tool that produces a .dll and a .lib. The 2499 Example for a linker tool that produces a .dll and a .lib. The
2499 use of {{output_extension}} rather than hardcoding ".dll" 2500 use of {{output_extension}} rather than hardcoding ".dll"
2500 allows the extension of the library to be overridden on a 2501 allows the extension of the library to be overridden on a
2501 target-by-target basis, but in this example, it always 2502 target-by-target basis, but in this example, it always
2502 produces a ".lib" import library: 2503 produces a ".lib" import library:
2503 outputs = [ 2504 outputs = [
2504 "{{root_out_dir}}/{{target_output_name}}{{output_extension}}", 2505 "{{root_out_dir}}/{{target_output_name}}{{output_extension}}",
2505 "{{root_out_dir}}/{{target_output_name}}.lib", 2506 "{{root_out_dir}}/{{target_output_name}}.lib",
2506 ] 2507 ]
2507 2508
2508 link_output [string with substitutions] 2509 link_output [string with substitutions]
2509 depend_output [string with substitutions] 2510 depend_output [string with substitutions]
2511 runtime_link_output [string with substitutions]
2510 Valid for: "solink" only (optional) 2512 Valid for: "solink" only (optional)
2511 2513
2512 These two files specify which of the outputs from the solink 2514 These three files specify which of the outputs from the solink
2513 tool should be used for linking and dependency tracking. These 2515 tool should be used for linking and dependency tracking. These
2514 should match entries in the "outputs". If unspecified, the 2516 should match entries in the "outputs". If unspecified, the
2515 first item in the "outputs" array will be used for both. See 2517 first item in the "outputs" array will be used for all. See
2516 "Separate linking and dependencies for shared libraries" 2518 "Separate linking and dependencies for shared libraries"
2517 below for more. 2519 below for more. If link_output is set but runtime_link_output
2520 is not set, runtime_link_output defaults to link_output.
2518 2521
2519 On Windows, where the tools produce a .dll shared library and 2522 On Windows, where the tools produce a .dll shared library and
2520 a .lib import library, you will want both of these to be the 2523 a .lib import library, you will want the first two to be the
2521 import library. On Linux, if you're not doing the separate 2524 import library and the third one to be the .dll file.
2522 linking/dependency optimization, both of these should be the 2525 On Linux, if you're not doing the separate linking/dependency
2523 .so output. 2526 optimization, all of these should be the .so output.
2524 2527
2525 output_prefix [string] 2528 output_prefix [string]
2526 Valid for: Linker tools (optional) 2529 Valid for: Linker tools (optional)
2527 2530
2528 Prefix to use for the output name. Defaults to empty. This 2531 Prefix to use for the output name. Defaults to empty. This
2529 prefix will be prepended to the name of the target (or the 2532 prefix will be prepended to the name of the target (or the
2530 output_name if one is manually specified for it) if the prefix 2533 output_name if one is manually specified for it) if the prefix
2531 is not already there. The result will show up in the 2534 is not already there. The result will show up in the
2532 {{output_name}} substitution pattern. 2535 {{output_name}} substitution pattern.
2533 2536
(...skipping 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after
5308 ** -q**: Quiet mode. Don't print output on success. 5311 ** -q**: Quiet mode. Don't print output on success.
5309 ** \--root**: Explicitly specify source root. 5312 ** \--root**: Explicitly specify source root.
5310 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. 5313 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file.
5311 ** \--threads**: Specify number of worker threads. 5314 ** \--threads**: Specify number of worker threads.
5312 ** \--time**: Outputs a summary of how long everything took. 5315 ** \--time**: Outputs a summary of how long everything took.
5313 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. 5316 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file.
5314 ** -v**: Verbose logging. 5317 ** -v**: Verbose logging.
5315 ** \--version**: Prints the GN version number and exits. 5318 ** \--version**: Prints the GN version number and exits.
5316 5319
5317 ``` 5320 ```
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