summaryrefslogtreecommitdiffstats
path: root/tools/gn
diff options
context:
space:
mode:
authorjbroman <jbroman@chromium.org>2015-11-30 07:42:31 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-30 15:43:35 +0000
commitb634f17a82d488df8851049c6ec2ad160b3547d3 (patch)
tree15d0faa375435040eaa3d75512ebb27463897d50 /tools/gn
parentc6402050e90b4cb39482b8f755a0e72b2d2181e2 (diff)
downloadchromium_src-b634f17a82d488df8851049c6ec2ad160b3547d3.zip
chromium_src-b634f17a82d488df8851049c6ec2ad160b3547d3.tar.gz
chromium_src-b634f17a82d488df8851049c6ec2ad160b3547d3.tar.bz2
GN: Use all targets to determine whether a file is generated (for `check`).
BUG=562675 Review URL: https://codereview.chromium.org/1479313002 Cr-Commit-Position: refs/heads/master@{#362135}
Diffstat (limited to 'tools/gn')
-rw-r--r--tools/gn/header_checker.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/gn/header_checker.cc b/tools/gn/header_checker.cc
index b15b4fa..05b624c 100644
--- a/tools/gn/header_checker.cc
+++ b/tools/gn/header_checker.cc
@@ -163,9 +163,11 @@ void HeaderChecker::RunCheckOverFiles(const FileMap& files, bool force_check) {
type != SOURCE_M && type != SOURCE_MM && type != SOURCE_RC)
continue;
- // If any target marks it as generated, don't check it.
+ // If any target marks it as generated, don't check it. We have to check
+ // file_map_, which includes all known files; files only includes those
+ // being checked.
bool is_generated = false;
- for (const auto& vect_i : file.second)
+ for (const auto& vect_i : file_map_[file.first])
is_generated |= vect_i.is_generated;
if (is_generated)
continue;