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

Unified Diff: tools/gn/ninja_target_writer.cc

Issue 630223002: gn: Support build directories outside the source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch that compiles and passes unit tests on both Windows and Linux Created 6 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
« no previous file with comments | « tools/gn/ninja_build_writer.cc ('k') | tools/gn/ninja_toolchain_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_target_writer.cc
diff --git a/tools/gn/ninja_target_writer.cc b/tools/gn/ninja_target_writer.cc
index 870cbb6d2eab11f8c88e3bf9ee1615796ef982ba..8a5d0ee75c9f347fb08f43dceae5e184784c2fc7 100644
--- a/tools/gn/ninja_target_writer.cc
+++ b/tools/gn/ninja_target_writer.cc
@@ -28,7 +28,9 @@ NinjaTargetWriter::NinjaTargetWriter(const Target* target,
: settings_(target->settings()),
target_(target),
out_(out),
- path_output_(settings_->build_settings()->build_dir(), ESCAPE_NINJA) {
+ path_output_(settings_->build_settings()->build_dir(),
+ settings_->build_settings()->root_path_utf8(),
+ ESCAPE_NINJA) {
}
NinjaTargetWriter::~NinjaTargetWriter() {
@@ -174,8 +176,9 @@ OutputFile NinjaTargetWriter::WriteInputDepsStampAndGetDep(
// optimal thing in all cases.
OutputFile input_stamp_file(
- RebaseSourceAbsolutePath(GetTargetOutputDir(target_).value(),
- settings_->build_settings()->build_dir()));
+ RebasePath(GetTargetOutputDir(target_).value(),
+ settings_->build_settings()->build_dir(),
+ settings_->build_settings()->root_path_utf8()));
input_stamp_file.value().append(target_->label().name());
input_stamp_file.value().append(".inputdeps.stamp");
« no previous file with comments | « tools/gn/ninja_build_writer.cc ('k') | tools/gn/ninja_toolchain_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698