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

Unified Diff: trunk/src/tools/gn/ninja_binary_target_writer.cc

Issue 46313006: Revert 232657 "GN: toolchain threading cleanup" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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: trunk/src/tools/gn/ninja_binary_target_writer.cc
===================================================================
--- trunk/src/tools/gn/ninja_binary_target_writer.cc (revision 232660)
+++ trunk/src/tools/gn/ninja_binary_target_writer.cc (working copy)
@@ -86,9 +86,8 @@
} // namespace
NinjaBinaryTargetWriter::NinjaBinaryTargetWriter(const Target* target,
- const Toolchain* toolchain,
std::ostream& out)
- : NinjaTargetWriter(target, toolchain, out),
+ : NinjaTargetWriter(target, out),
tool_type_(GetToolTypeForTarget(target)){
}
@@ -146,6 +145,7 @@
const Target::FileList& sources = target_->sources();
object_files->reserve(sources.size());
+ const Toolchain* toolchain = GetToolchain();
std::string implicit_deps = GetSourcesImplicitDeps();
for (size_t i = 0; i < sources.size(); i++) {
@@ -156,7 +156,7 @@
if (input_file_type == SOURCE_UNKNOWN)
continue; // Skip unknown file types.
std::string command =
- helper_.GetRuleForSourceType(settings_, input_file_type);
+ helper_.GetRuleForSourceType(settings_, toolchain, input_file_type);
if (command.empty())
continue; // Skip files not needing compilation.
@@ -265,7 +265,8 @@
RecursiveTargetConfigStringsToStream(target_, &ConfigValues::ldflags,
flag_options, out_);
- const Toolchain::Tool& tool = toolchain_->GetTool(tool_type_);
+ const Toolchain* toolchain = GetToolchain();
+ const Toolchain::Tool& tool = toolchain->GetTool(tool_type_);
// Followed by library search paths that have been recursively pushed
// through the dependency tree.
@@ -305,7 +306,7 @@
path_output_.WriteFile(out_, external_output_file);
}
out_ << ": "
- << helper_.GetRulePrefix(target_->settings())
+ << helper_.GetRulePrefix(GetToolchain())
<< Toolchain::ToolTypeToName(tool_type_);
std::set<OutputFile> extra_object_files;
@@ -345,7 +346,7 @@
out_ << "build ";
path_output_.WriteFile(out_, helper_.GetTargetOutputFile(target_));
out_ << ": "
- << helper_.GetRulePrefix(target_->settings())
+ << helper_.GetRulePrefix(target_->settings()->toolchain())
<< "stamp";
std::set<OutputFile> extra_object_files;
« no previous file with comments | « trunk/src/tools/gn/ninja_binary_target_writer.h ('k') | trunk/src/tools/gn/ninja_binary_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698