Index: pylib/gyp/generator/ninja.py |
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py |
index 7cdb0e80e6058ed5a745c53b098f99b33d9f68df..3d33d0ac6810606a472766ec957f68d335650d5b 100644 |
--- a/pylib/gyp/generator/ninja.py |
+++ b/pylib/gyp/generator/ninja.py |
@@ -599,8 +599,9 @@ class NinjaWriter: |
is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(action) |
if self.flavor == 'win' else False) |
args = action['action'] |
+ pool = 'console' if int(action.get('ninja_use_console', 0)) else None |
rule_name, _ = self.WriteNewNinjaRule(name, args, description, |
- is_cygwin, env=env) |
+ is_cygwin, env, pool) |
inputs = [self.GypPathToNinja(i, env) for i in action['inputs']] |
if int(action.get('process_outputs_as_sources', False)): |
@@ -638,8 +639,9 @@ class NinjaWriter: |
('%s ' + generator_default_variables['RULE_INPUT_PATH']) % name) |
is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(rule) |
if self.flavor == 'win' else False) |
+ pool = 'console' if int(rule.get('ninja_use_console', 0)) else None |
rule_name, args = self.WriteNewNinjaRule( |
- name, args, description, is_cygwin, env=env) |
+ name, args, description, is_cygwin, env, pool) |
# TODO: if the command references the outputs directly, we should |
# simplify it to just use $out. |
@@ -1427,7 +1429,7 @@ class NinjaWriter: |
values = [] |
ninja_file.variable(var, ' '.join(values)) |
- def WriteNewNinjaRule(self, name, args, description, is_cygwin, env): |
+ def WriteNewNinjaRule(self, name, args, description, is_cygwin, env, pool): |
"""Write out a new ninja "rule" statement for a given command. |
Returns the name of the new rule, and a copy of |args| with variables |
@@ -1485,7 +1487,7 @@ class NinjaWriter: |
# GYP rules/actions express being no-ops by not touching their outputs. |
# Avoid executing downstream dependencies in this case by specifying |
# restat=1 to ninja. |
- self.ninja.rule(rule_name, command, description, restat=True, |
+ self.ninja.rule(rule_name, command, description, restat=True, pool=pool, |
rspfile=rspfile, rspfile_content=rspfile_content) |
self.ninja.newline() |