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) { |