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

Unified Diff: tools/gn/function_write_file.cc

Issue 630223002: gn: Support build directories outside the source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated patch set 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
Index: tools/gn/function_write_file.cc
diff --git a/tools/gn/function_write_file.cc b/tools/gn/function_write_file.cc
index 55f4d5dc63a0e543fe9d58dfca7cbb2968188356..0d273fc5973fed3a9ce8ca7fd477500c22952af7 100644
--- a/tools/gn/function_write_file.cc
+++ b/tools/gn/function_write_file.cc
@@ -57,7 +57,8 @@ Value RunWriteFile(Scope* scope,
if (!args[0].VerifyTypeIs(Value::STRING, err))
return Value();
const SourceDir& cur_dir = scope->GetSourceDir();
- SourceFile source_file = cur_dir.ResolveRelativeFile(args[0].string_value());
+ SourceFile source_file = cur_dir.ResolveRelativeFile(args[0].string_value(),
+ scope->settings()->build_settings()->root_path_utf8());
if (!EnsureStringIsInOutputDir(
scope->settings()->build_settings()->build_dir(),
source_file.value(), args[0].origin(), err))

Powered by Google App Engine
This is Rietveld 408576698