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

Unified Diff: tools/gn/function_exec_script.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_exec_script.cc
diff --git a/tools/gn/function_exec_script.cc b/tools/gn/function_exec_script.cc
index 05270b24f8653ed3b76c7935bc94f313af03194b..2b21b728fd2fa2bfcd2c0831e0fa99f014b5b240 100644
--- a/tools/gn/function_exec_script.cc
+++ b/tools/gn/function_exec_script.cc
@@ -100,7 +100,8 @@ Value RunExecScript(Scope* scope,
if (!args[0].VerifyTypeIs(Value::STRING, err))
return Value();
SourceFile script_source =
- cur_dir.ResolveRelativeFile(args[0].string_value());
+ cur_dir.ResolveRelativeFile(args[0].string_value(),
+ scope->settings()->build_settings()->root_path_utf8());
base::FilePath script_path = build_settings->GetFullPath(script_source);
if (!build_settings->secondary_source_path().empty() &&
!base::PathExists(script_path)) {
@@ -124,7 +125,8 @@ Value RunExecScript(Scope* scope,
return Value();
g_scheduler->AddGenDependency(
build_settings->GetFullPath(cur_dir.ResolveRelativeFile(
- dep.string_value())));
+ dep.string_value(),
+ scope->settings()->build_settings()->root_path_utf8())));
}
}

Powered by Google App Engine
This is Rietveld 408576698