Index: tools/gn/ninja_binary_target_writer.cc |
diff --git a/tools/gn/ninja_binary_target_writer.cc b/tools/gn/ninja_binary_target_writer.cc |
index b341639b5d433964712093f72b0a519f0c14e290..27defbc7b87a16a16b01a390a187244f47ca4260 100644 |
--- a/tools/gn/ninja_binary_target_writer.cc |
+++ b/tools/gn/ninja_binary_target_writer.cc |
@@ -103,6 +103,7 @@ void NinjaBinaryTargetWriter::WriteCompilerVars() { |
if (subst.used[SUBSTITUTION_INCLUDE_DIRS]) { |
out_ << kSubstitutionNinjaNames[SUBSTITUTION_INCLUDE_DIRS] << " ="; |
PathOutput include_path_output(path_output_.current_dir(), |
+ settings_->build_settings()->root_path(), |
ESCAPE_NINJA_COMMAND); |
RecursiveTargetConfigToStream<SourceDir>( |
target_, &ConfigValues::include_dirs, |
@@ -150,6 +151,7 @@ void NinjaBinaryTargetWriter::WriteSources( |
if (tool_type != Toolchain::TYPE_NONE) { |
out_ << "build"; |
path_output_.WriteFiles(out_, tool_outputs); |
+ |
out_ << ": " << rule_prefix << Toolchain::ToolTypeToName(tool_type); |
out_ << " "; |
path_output_.WriteFile(out_, source); |
@@ -288,6 +290,7 @@ void NinjaBinaryTargetWriter::WriteLinkerFlags() { |
// Since we're passing these on the command line to the linker and not |
// to Ninja, we need to do shell escaping. |
PathOutput lib_path_output(path_output_.current_dir(), |
+ settings_->build_settings()->root_path(), |
ESCAPE_NINJA_COMMAND); |
for (size_t i = 0; i < all_lib_dirs.size(); i++) { |
out_ << " " << tool_->lib_dir_switch(); |