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

Unified Diff: tools/gn/docs/reference.md

Issue 1868023002: Add GN output prefix override and allow empty output extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/binary_target_generator.cc ('k') | tools/gn/function_toolchain.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/docs/reference.md
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md
index 70cc6b3a65b675d06f0451c73a6ecd153321570b..22cbee0aa6802cc1617ae682066a29704eef8bc0 100644
--- a/tools/gn/docs/reference.md
+++ b/tools/gn/docs/reference.md
@@ -2845,6 +2845,10 @@
is not already there. The result will show up in the
{{output_name}} substitution pattern.
+ Individual targets can opt-out of the output prefix by setting:
+ output_prefix_override = true
+ (see "gn help output_prefix_override").
+
This is typically used to prepend "lib" to libraries on
Posix systems:
output_prefix = "lib"
@@ -4664,9 +4668,11 @@
override the name (for example to use "libfreetype.so.6" instead
of libfreetype.so on Linux).
- This value should not include a leading dot. If undefined or empty,
- the default_output_extension specified on the tool will be used.
- The output_extension will be used in the "{{output_extension}}"
+ This value should not include a leading dot. If undefined, the default
+ specified on the tool will be used. If set to the empty string, no
+ output extension will be used.
+
+ The output_extension will be used to set the "{{output_extension}}"
expansion which the linker tool will generally use to specify the
output file name. See "gn help tool".
@@ -4724,6 +4730,35 @@
```
+## **output_prefix_override**: Don't use prefix for output name.
+
+```
+ A boolean that overrides the output prefix for a target. Defaults to
+ false.
+
+ Some systems use prefixes for the names of the final target output
+ file. The normal example is "libfoo.so" on Linux for a target
+ named "foo".
+
+ The output prefix for a given target type is specified on the linker
+ tool (see "gn help tool"). Sometimes this prefix is undesired.
+
+ See also "gn help output_extension".
+
+```
+
+### **Example**
+
+```
+ shared_library("doom_melon") {
+ # Normally this will produce "libdoom_melon.so" on Linux, setting
+ # Setting this flag will produce "doom_melon.so".
+ output_prefix_override = true
+ ...
+ }
+
+
+```
## **outputs**: Output files for actions and copy targets.
```
@@ -5131,6 +5166,29 @@
```
+## **write_runtime_deps**: Writes the target's runtime_deps to the given path.
+
+```
+ Does not synchronously write the file, but rather schedules it
+ to be written at the end of generation.
+
+ If the file exists and the contents are identical to that being
+ written, the file will not be updated. This will prevent unnecessary
+ rebuilds of targets that depend on this file.
+
+ Path must be within the output directory.
+
+ See "gn help runtime_deps" for how the runtime dependencies are
+ computed.
+
+ The format of this file will list one file per line with no escaping.
+ The files will be relative to the root_build_dir. The first line of
+ the file will be the main output file of the target itself. The file
+ contents will be the same as requesting the runtime deps be written on
+ the command line (see "gn help --runtime-deps-list-file").
+
+
+```
## **Build Arguments Overview**
```
@@ -5561,8 +5619,8 @@
```
Runtime dependencies of a target are exposed via the "runtime_deps"
category of "gn desc" (see "gn help desc") or they can be written
- at build generation time via "--runtime-deps-list-file"
- (see "gn help --runtime-deps-list-file").
+ at build generation time via write_runtime_deps(), or
+ --runtime-deps-list-file (see "gn help --runtime-deps-list-file").
To a first approximation, the runtime dependencies of a target are
the set of "data" files, data directories, and the shared libraries
« no previous file with comments | « tools/gn/binary_target_generator.cc ('k') | tools/gn/function_toolchain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698