aboutsummaryrefslogtreecommitdiff
path: root/ninja.cc
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-11-04 16:57:57 -0700
committerDan Willemsen <dwillemsen@google.com>2016-11-05 13:05:48 -0700
commit2f75ffadfbd550b2efd68816c33918c86554ed4b (patch)
tree6fe8fea02b2d7fc96bdb0be256ce767ce471ef50 /ninja.cc
parent69fed2db6db59584db323400580fa0aadd7e4609 (diff)
Allow rules to specify custom ninja pools
Setting .KATI_NINJA_POOL as a rule variable will set the corresponding pool variable in the ninja file. There's no way to define custom pools in Kati, Android is planning on scaling the pool depth in a parent ninja file without re-running Kati.
Diffstat (limited to 'ninja.cc')
-rw-r--r--ninja.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/ninja.cc b/ninja.cc
index 579cea3..fca3ace 100644
--- a/ninja.cc
+++ b/ninja.cc
@@ -561,8 +561,13 @@ class NinjaGenerator {
}
}
*o << "\n";
- if (use_local_pool)
+ if (node->ninja_pool_var) {
+ string pool;
+ node->ninja_pool_var->Eval(ev_, &pool);
+ *o << " pool = " << pool << "\n";
+ } else if (use_local_pool) {
*o << " pool = local_pool\n";
+ }
if (node->is_default_target) {
unique_lock<mutex> lock(mu_);
default_target_ = node;