 Chromium Code Reviews
 Chromium Code Reviews Issue 2926013002:
  Support explicit pools in actions  (Closed)
    
  
    Issue 2926013002:
  Support explicit pools in actions  (Closed) 
  | Index: tools/gn/variables.cc | 
| diff --git a/tools/gn/variables.cc b/tools/gn/variables.cc | 
| index bbb8791e1b4df358dd604e8506b86a82ba39b029..462fde312e7b00ebe38bf8ebfa8fdecd72a46992 100644 | 
| --- a/tools/gn/variables.cc | 
| +++ b/tools/gn/variables.cc | 
| @@ -929,24 +929,24 @@ Example | 
| const char kConsole[] = "console"; | 
| 
brettw
2017/06/28 21:23:27
I think this can be deleted.
 
Petr Hosek
2017/06/28 23:42:32
Done.
 | 
| const char kConsole_HelpShort[] = | 
| - "console: [boolean] Run this action in the console pool."; | 
| + "console: [label] Console pool object."; | 
| const char kConsole_Help[] = | 
| - R"(console: Run this action in the console pool. | 
| + R"(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. | 
| Example | 
| - action("long_action_with_progress_logs") { | 
| - console = true | 
| + action("my_action") { | 
| + ... | 
| + pool = console | 
| + ... | 
| } | 
| )"; | 
| @@ -1441,6 +1441,23 @@ const char kOutputs_Help[] = | 
| with no source expansions. See "gn help action". | 
| )"; | 
| +const char kPool[] = "pool"; | 
| +const char kPool_HelpShort[] = | 
| + "pool: [string] Label of the pool used by the action."; | 
| +const char kPool_Help[] = | 
| + R"(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" | 
| + ... | 
| + } | 
| +)"; | 
| + | 
| const char kPrecompiledHeader[] = "precompiled_header"; | 
| const char kPrecompiledHeader_HelpShort[] = | 
| "precompiled_header: [string] Header file to precompile."; | 
| @@ -1921,6 +1938,7 @@ const VariableInfoMap& GetTargetVariables() { | 
| INSERT_VARIABLE(OutputName) | 
| INSERT_VARIABLE(OutputPrefixOverride) | 
| INSERT_VARIABLE(Outputs) | 
| + INSERT_VARIABLE(Pool) | 
| INSERT_VARIABLE(PrecompiledHeader) | 
| INSERT_VARIABLE(PrecompiledHeaderType) | 
| INSERT_VARIABLE(PrecompiledSource) |