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

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

Issue 2200123002: Add option to not generate VS projects for targets deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/command_gen.cc ('k') | tools/gn/visual_studio_writer.h » ('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 acf0ac17fe6433ab4366eb553f2b731695c8c4d3..d25782f09d71b4aaed639aa0ec5c9b97f7e6a7fb 100644
--- a/tools/gn/docs/reference.md
+++ b/tools/gn/docs/reference.md
@@ -446,7 +446,7 @@
```
-## **gn desc <out_dir> <label or pattern> [<what to show>] [\--blame]**
+## **gn desc <out_dir> <label or pattern> [<what to show>] [\--blame] [\--format=json]**
```
Displays information about a given target or config. The build
@@ -512,6 +512,9 @@
this flag, only the default toolchain one will be matched by
wildcards. With this flag, both will be matched.
+ --format=json
+ Format the output as JSON instead of text.
+
```
### **Target flags**
@@ -702,12 +705,13 @@
"vs2015" - Visual Studio 2015 project/solution files.
"xcode" - Xcode workspace/solution files.
"qtcreator" - QtCreator project files.
+ "json" - JSON file containing target information
--filters=<path_prefixes>
Semicolon-separated list of label patterns used to limit the set
of generated projects (see "gn help label_pattern"). Only
matching targets and their dependencies will be included in the
- solution. Only used for Visual Studio and Xcode.
+ solution. Only used for Visual Studio, Xcode and JSON.
```
@@ -718,6 +722,11 @@
Override default sln file name ("all"). Solution file is written
to the root build directory.
+ --no-deps
+ Don't include targets dependencies to the solution. Changes the
+ way how --filters option works. Only directly matching targets are
+ included.
+
```
### **Xcode Flags**
@@ -762,6 +771,29 @@
project. This works fairly well but may still result in a few indexer
issues here and there.
+```
+
+### **Generic JSON Output**
+
+```
+ Dumps target information to JSON file and optionally invokes python
+ script on generated file.
+ See comments at the beginning of json_project_writer.cc and
+ desc_builder.cc for overview of JSON file format.
+
+ --json-file-name=<json_file_name>
+ Overrides default file name (project.json) of generated JSON file.
+
+ --json-ide-script=<path_to_python_script>
+ Executes python script after the JSON file is generated.
+ Path can be project absolute (//), system absolute (/) or
+ relative, in which case the output directory will be base.
+ Path to generated JSON file will be first argument when invoking
+ script.
+
+ --json-ide-script-args=<argument>
+ Optional second argument that will passed to executed script.
+
```
## **gn help <anything>**
@@ -3031,9 +3063,7 @@
If you specify more than one output for shared library links,
you should consider setting link_output, depend_output, and
- runtime_link_output. Otherwise, the first entry in the
- outputs list should always be the main output which will be
- linked to.
+ runtime_outputs.
Example for a compiler tool that produces .obj files:
outputs = [
@@ -3058,16 +3088,14 @@
link_output [string with substitutions]
depend_output [string with substitutions]
- runtime_link_output [string with substitutions]
Valid for: "solink" only (optional)
- These three files specify which of the outputs from the solink
+ These two files specify which of the outputs from the solink
tool should be used for linking and dependency tracking. These
should match entries in the "outputs". If unspecified, the
first item in the "outputs" array will be used for all. See
"Separate linking and dependencies for shared libraries"
- below for more. If link_output is set but runtime_link_output
- is not set, runtime_link_output defaults to link_output.
+ below for more.
On Windows, where the tools produce a .dll shared library and
a .lib import library, you will want the first two to be the
@@ -3144,6 +3172,14 @@
rspfile_content = "{{inputs}} {{solibs}} {{libs}}"
}
+ runtime_outputs [string list with substitutions]
+ Valid for: linker tools
+
+ If specified, this list is the subset of the outputs that should
+ be added to runtime deps (see "gn help runtime_deps"). By
+ default (if runtime_outputs is empty or unspecified), it will be
+ the link_output.
+
```
### **Expansions for tool variables**
@@ -6157,11 +6193,9 @@
### **Multiple outputs**
```
- When a tool produces more than one output, only the first output
- is considered. For example, a shared library target may produce a
- .dll and a .lib file on Windows. Only the .dll file will be considered
- a runtime dependency. This applies only to linker tools. Scripts and
- copy steps with multiple outputs will get all outputs listed.
+ Linker tools can specify which of their outputs should be considered
+ when computing the runtime deps by setting runtime_outputs. If this
+ is unset on the tool, the default will be the first output only.
```
« no previous file with comments | « tools/gn/command_gen.cc ('k') | tools/gn/visual_studio_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698