Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / tools / gn / import_manager.cc
index 2e8293e..4bb4b63 100644 (file)
@@ -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())