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

Unified Diff: tools/gn/loader.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/item.cc ('k') | tools/gn/loader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/loader.cc
diff --git a/tools/gn/loader.cc b/tools/gn/loader.cc
index 0ede3c95548389882fab5481a9f3ad532cb5e061..417a8914d17e01b492d51b28847356ffcd59dea5 100644
--- a/tools/gn/loader.cc
+++ b/tools/gn/loader.cc
@@ -1,7 +1,6 @@
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
#include "tools/gn/loader.h"
#include "base/bind.h"
@@ -251,6 +250,11 @@ void LoaderImpl::BackgroundLoadFile(const Settings* settings,
}
Scope our_scope(settings->base_config());
+
+ const auto location = root->GetRange().begin();
+ if (!location.is_null())
+ our_scope.AddInputFile(location.file());
+
ScopePerFileProvider per_file_provider(&our_scope, true);
our_scope.set_source_dir(file_name.GetDir());
« no previous file with comments | « tools/gn/item.cc ('k') | tools/gn/loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698