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

Unified Diff: tools/gn/import_manager.cc

Issue 226223006: Template invocation fixes in GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
Index: tools/gn/import_manager.cc
diff --git a/tools/gn/import_manager.cc b/tools/gn/import_manager.cc
index 2e8293ed7cff7071459aa733be4af6b1ba31d1e3..4bb4b63eee731b3c2cccc834499c7c2e53a58c59 100644
--- a/tools/gn/import_manager.cc
+++ b/tools/gn/import_manager.cc
@@ -25,8 +25,13 @@ Scope* UncachedImport(const Settings* settings,
CHECK(block);
scoped_ptr<Scope> scope(new Scope(settings->base_config()));
- ScopePerFileProvider per_file_provider(scope.get());
scope->set_source_dir(file.GetDir());
+
+ // Don't allow ScopePerFileProvider to provide target-related variables.
+ // These will be relative to the imported file, which is probably not what
+ // people mean when they use these.
+ ScopePerFileProvider per_file_provider(scope.get(), false);
+
scope->SetProcessingImport();
block->ExecuteBlockInScope(scope.get(), err);
if (err->has_error())
« base/BUILD.gn ('K') | « build/config/BUILD.gn ('k') | tools/gn/loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698