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

Unified Diff: tools/gn/ninja_build_writer.cc

Issue 2926013002: Support explicit pools in actions (Closed)
Patch Set: 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/ninja_build_writer.cc
diff --git a/tools/gn/ninja_build_writer.cc b/tools/gn/ninja_build_writer.cc
index f3e9aaf59ac6263f573f4c6b904d0c0f97ea2140..d732d90dc9a0d7aaf2b504e9c75ca9db2e8296bf 100644
--- a/tools/gn/ninja_build_writer.cc
+++ b/tools/gn/ninja_build_writer.cc
@@ -285,6 +285,14 @@ void NinjaBuildWriter::WriteAllPools() {
}
}
+ for (const Target* target : default_toolchain_targets_) {
+ if (target->output_type() == Target::ACTION) {
+ const LabelPtrPair<Pool>& pool = target->action_values().pool();
+ if (pool.ptr)
+ used_pools.insert(pool.ptr);
+ }
+ }
+
// Write pools sorted by their name, to make output deterministic.
std::vector<const Pool*> sorted_pools(used_pools.begin(), used_pools.end());
auto pool_name = [this](const Pool* pool) {

Powered by Google App Engine
This is Rietveld 408576698