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

Unified Diff: tools/gn/ninja_toolchain_writer.cc

Issue 51693002: GN: toolchain threading cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | « tools/gn/ninja_target_writer.cc ('k') | tools/gn/scope_per_file_provider.cc » ('j') | 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 310caba6f6bfa3f1f621462b53a4d74b19cdfdea..5f33e69810c6b626a1fc317e46257a0b594a9473 100644
--- a/tools/gn/ninja_toolchain_writer.cc
+++ b/tools/gn/ninja_toolchain_writer.cc
@@ -13,6 +13,7 @@
#include "tools/gn/settings.h"
#include "tools/gn/target.h"
#include "tools/gn/toolchain.h"
+#include "tools/gn/toolchain_manager.h"
#include "tools/gn/trace.h"
NinjaToolchainWriter::NinjaToolchainWriter(
@@ -62,11 +63,14 @@ bool NinjaToolchainWriter::RunAndWriteFile(
}
void NinjaToolchainWriter::WriteRules() {
- const Toolchain* tc = settings_->toolchain();
+ const Toolchain* tc = settings_->build_settings()->toolchain_manager()
+ .GetToolchainDefinitionUnlocked(settings_->toolchain_label());
+ CHECK(tc);
+
std::string indent(" ");
NinjaHelper helper(settings_->build_settings());
- std::string rule_prefix = helper.GetRulePrefix(tc);
+ std::string rule_prefix = helper.GetRulePrefix(settings_);
for (int i = Toolchain::TYPE_NONE + 1; i < Toolchain::TYPE_NUMTYPES; i++) {
Toolchain::ToolType tool_type = static_cast<Toolchain::ToolType>(i);
« no previous file with comments | « tools/gn/ninja_target_writer.cc ('k') | tools/gn/scope_per_file_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698