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

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

Issue 2926013002: Support explicit pools in actions (Closed)
Patch Set: Support explicit pools in actions Created 3 years, 6 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
Index: tools/gn/docs/reference.md
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md
index 2e6aa6f679320d83c4cec87effe31aef2e86fc9a..a28bc6f991f3e2f355411d1293f667cfa5eba79e 100644
--- a/tools/gn/docs/reference.md
+++ b/tools/gn/docs/reference.md
@@ -96,7 +96,7 @@
* [code_signing_sources: [file list] Sources for code signing step.](#code_signing_sources)
* [complete_static_lib: [boolean] Links all deps into a static library.](#complete_static_lib)
* [configs: [label list] Configs applying to this target or config.](#configs)
- * [console: [boolean] Run this action in the console pool.](#console)
+ * [console: [label] Console pool object.](#console)
* [data: [file list] Runtime data file dependencies.](#data)
* [data_deps: [label list] Non-linked dependencies.](#data_deps)
* [defines: [string list] C preprocessor defines.](#defines)
@@ -112,6 +112,7 @@
* [output_name: [string] Name for the output file other than the default.](#output_name)
* [output_prefix_override: [boolean] Don't use prefix for output name.](#output_prefix_override)
* [outputs: [file list] Output files for actions and copy targets.](#outputs)
+ * [pool: [string] Label of the pool used by the action.](#pool)
* [precompiled_header: [string] Header file to precompile.](#precompiled_header)
* [precompiled_header_type: [string] "gcc" or "msvc".](#precompiled_header_type)
* [precompiled_source: [file name] Source file to precompile.](#precompiled_source)
@@ -598,7 +599,7 @@
### <a name="gen:"></a>**gn gen**: Generate ninja files.
```
- gn gen [<ide options>] <out_dir>
+ gn gen [--check] [<ide options>] <out_dir>
Generates ninja files from the current tree and puts them in the given output
directory.
@@ -608,6 +609,9 @@
Or it can be a directory relative to the current directory such as:
out/foo
+ "gn gen --check" is the same as running "gn check". See "gn help check"
+ for documentation on that mode.
+
See "gn help switches" for the common command-line switches.
```
@@ -645,6 +649,11 @@
--no-deps
Don't include targets dependencies to the solution. Changes the way how
--filters option works. Only directly matching targets are included.
+
+ --winsdk=<sdk_version>
+ Use the specified Windows 10 SDK version to generate project files.
+ As an example, "10.0.15063.0" can be specified to use Creators Update SDK
+ instead of the default one.
```
#### **Xcode Flags**
@@ -688,9 +697,10 @@
#### **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.
+ Dumps target information to a JSON file and optionally invokes a
+ python script on the generated file. See the comments at the beginning
+ of json_project_writer.cc and desc_builder.cc for an overview of the JSON
+ file format.
--json-file-name=<json_file_name>
Overrides default file name (project.json) of generated JSON file.
@@ -1932,7 +1942,7 @@
get_label_info(":foo", "name")
# Returns string "foo".
- get_label_info("//foo/bar:baz", "gen_dir")
+ get_label_info("//foo/bar:baz", "target_gen_dir")
# Returns string "//out/Debug/gen/foo/bar".
```
### <a name="get_path_info"></a>**get_path_info**: Extract parts of a file or directory name.
@@ -2686,6 +2696,7 @@
Other tools:
"stamp": Tool for creating stamp files
"copy": Tool to copy files.
+ "action": Defaults for actions
Platform specific tools:
"copy_bundle_data": [iOS, OS X] Tool to copy files in a bundle.
@@ -2696,7 +2707,7 @@
```
command [string with substitutions]
- Valid for: all tools (required)
+ Valid for: all tools except "action" (required)
The command to run.
@@ -2796,6 +2807,7 @@
]
pool [label, optional]
+ Valid for: all tools (optional)
Label of the pool to use for the tool. Pools are used to limit the
number of tasks that can execute concurrently during the build.
@@ -2866,13 +2878,13 @@
restat = true
rspfile [string with substitutions]
- Valid for: all tools (optional)
+ Valid for: all tools except "action" (optional)
Name of the response file. If empty, no response file will be
used. See "rspfile_content".
rspfile_content [string with substitutions]
- Valid for: all tools (required when "rspfile" is specified)
+ Valid for: all tools except "action" (required when "rspfile" is used)
The contents to be written to the response file. This may include all
or part of the command to send to the tool which allows you to get
@@ -4279,15 +4291,13 @@
}
}
```
-### <a name="console"></a>**console**: Run this action in the console pool.
+### <a name="console"></a>**console**: Console pool objects.
```
- Boolean. Defaults to false.
-
- Actions marked "console = true" will be run in the built-in ninja "console"
- pool. They will have access to real stdin and stdout, and output will not be
- buffered by ninja. This can be useful for long-running actions with progress
- logs, or actions that require user input.
+ Console pool is a special pool object that uses the built-in ninja "console"
+ pool. Target using this pool will have access to real stdin and stdout, and
+ output will not be buffered by ninja. This can be useful for long-running
+ actions with progress logs, or actions that require user input.
Only one console pool target can run at any one time in Ninja. Refer to the
Ninja documentation on the console pool for more info.
@@ -4296,8 +4306,10 @@
#### **Example**
```
- action("long_action_with_progress_logs") {
- console = true
+ action("my_action") {
+ ...
+ pool = console
+ ...
}
```
### <a name="data"></a>**data**: Runtime data file dependencies.
@@ -4845,6 +4857,21 @@
Action targets (excluding action_foreach) must list literal output file(s)
with no source expansions. See "gn help action".
```
+### <a name="pool"></a>**pool**: Label of the pool used by the action.
+
+```
+ A fully-qualified label representing the pool that will be used for the
+ action. Pools are defined using the pool() {...} declaration.
+```
+
+#### **Example**
+
+```
+ action("action") {
+ pool = "//build:custom_pool"
+ ...
+ }
+```
### <a name="precompiled_header"></a>**precompiled_header**: [string] Header file to precompile.
```

Powered by Google App Engine
This is Rietveld 408576698