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

Unified Diff: tools/gn/ninja_toolchain_writer.cc

Issue 2182093002: [GN] Prefer explicit pool to automatic link_pool for link targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_toolchain_writer.cc
diff --git a/tools/gn/ninja_toolchain_writer.cc b/tools/gn/ninja_toolchain_writer.cc
index 9b699b8b70766ad02cf77dcdc3b9380636ec0e7d..9440d980f230586b6bdfbc731c37520bde6bc493 100644
--- a/tools/gn/ninja_toolchain_writer.cc
+++ b/tools/gn/ninja_toolchain_writer.cc
@@ -108,16 +108,17 @@ void NinjaToolchainWriter::WriteToolRule(const Toolchain::ToolType type,
out_ << kIndent << "deps = msvc" << std::endl;
}
- // The link pool applies to linker tools. Don't count TYPE_ALINK since
- // static libraries are not generally intensive to write.
- if (type == Toolchain::TYPE_SOLINK ||
- type == Toolchain::TYPE_SOLINK_MODULE ||
- type == Toolchain::TYPE_LINK) {
- out_ << kIndent << "pool = link_pool\n";
- } else if (tool->pool().ptr) {
+ // Use pool is specified.
+ if (tool->pool().ptr) {
std::string pool_name =
tool->pool().ptr->GetNinjaName(settings_->default_toolchain_label());
out_ << kIndent << "pool = " << pool_name << std::endl;
+ } else if (type == Toolchain::TYPE_SOLINK ||
+ type == Toolchain::TYPE_SOLINK_MODULE ||
+ type == Toolchain::TYPE_LINK) {
+ // The link pool applies to linker tools. Don't count TYPE_ALINK since
+ // static libraries are not generally intensive to write.
+ out_ << kIndent << "pool = link_pool\n";
}
if (tool->restat())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698