Commit 1c27131e authored by sdefresne's avatar sdefresne Committed by Commit bot

[GN] Prefer explicit pool to automatic link_pool for link targets.

In preparation of refactoring the concurrent_links code to use
explicit pools, prefer to use an explicit pool if defined over
the automatic link_pool for link targets.

BUG=612786

Review-Url: https://codereview.chromium.org/2182093002
Cr-Commit-Position: refs/heads/master@{#408077}
parent 322b6c29
...@@ -105,16 +105,17 @@ void NinjaToolchainWriter::WriteToolRule(const Toolchain::ToolType type, ...@@ -105,16 +105,17 @@ void NinjaToolchainWriter::WriteToolRule(const Toolchain::ToolType type,
out_ << kIndent << "deps = msvc" << std::endl; out_ << kIndent << "deps = msvc" << std::endl;
} }
// The link pool applies to linker tools. Don't count TYPE_ALINK since // Use pool is specified.
// static libraries are not generally intensive to write. if (tool->pool().ptr) {
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) {
std::string pool_name = std::string pool_name =
tool->pool().ptr->GetNinjaName(settings_->default_toolchain_label()); tool->pool().ptr->GetNinjaName(settings_->default_toolchain_label());
out_ << kIndent << "pool = " << pool_name << std::endl; 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()) if (tool->restat())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment