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

Unified Diff: tools/gn/setup.cc

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)
Patch Set: Fix compilation after rebase. Created 3 years, 6 months 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/setup.h ('k') | tools/gn/string_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/setup.cc
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc
index 7fc4a2ed4f29e09857304d0dc9abefc38fe9acf8..140f540d29a9fcdbccb02665368924d576cd7324 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -281,7 +281,7 @@ Setup::Setup()
root_build_file_("//BUILD.gn"),
check_public_headers_(false),
dotfile_settings_(&build_settings_, std::string()),
- dotfile_scope_(&dotfile_settings_),
+ dotfile_scope_(&dotfile_settings_, {}),
default_args_(nullptr),
fill_arguments_(true) {
dotfile_settings_.set_toolchain_label(Label());
@@ -471,7 +471,7 @@ bool Setup::FillArgsFromArgsInputFile() {
return false;
}
- Scope arg_scope(&dotfile_settings_);
+ Scope arg_scope(&dotfile_settings_, {args_input_file_.get()});
// Set soure dir so relative imports in args work.
SourceDir root_source_dir =
SourceDirForCurrentDirectory(build_settings_.root_path());
@@ -668,6 +668,7 @@ bool Setup::RunConfigFile() {
scheduler_.Log("Got dotfile", FilePathToUTF8(dotfile_name_));
dotfile_input_file_.reset(new InputFile(SourceFile("//.gn")));
+ dotfile_scope_.AddInputFile(dotfile_input_file_.get());
if (!dotfile_input_file_->Load(dotfile_name_)) {
Err(Location(), "Could not load dotfile.",
"The file \"" + FilePathToUTF8(dotfile_name_) + "\" couldn't be loaded")
« no previous file with comments | « tools/gn/setup.h ('k') | tools/gn/string_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698