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

Unified Diff: tools/gn/analyzer.cc

Issue 2780023002: Get gn analyze to respect changes to vs_toolchain.py (Closed)
Patch Set: Match more of the path to avoid false positives Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/analyzer.cc
diff --git a/tools/gn/analyzer.cc b/tools/gn/analyzer.cc
index 559287ef20ba418218ced85cb48965456e22895b..6e23c3450dfe17a79fb653603e6d688139bb5e65 100644
--- a/tools/gn/analyzer.cc
+++ b/tools/gn/analyzer.cc
@@ -59,7 +59,9 @@ LabelSet LabelsFor(const TargetSet& targets) {
bool AnyBuildFilesWereModified(const SourceFileSet& source_files) {
for (auto* file : source_files) {
if (base::EndsWith(file->value(), ".gn", base::CompareCase::SENSITIVE) ||
- base::EndsWith(file->value(), ".gni", base::CompareCase::SENSITIVE))
+ base::EndsWith(file->value(), ".gni", base::CompareCase::SENSITIVE) ||
+ base::EndsWith(file->value(), "build/vs_toolchain.py",
+ base::CompareCase::SENSITIVE))
return true;
}
return false;
@@ -262,7 +264,7 @@ std::string Analyzer::Analyze(const std::string& input, Err* err) const {
// TODO(crbug.com/555273): We can do smarter things when we detect changes
// to build files. For example, if all of the ninja files are unchanged,
- // we know that we can ignore changes to these files. Also, for most .gn
+ // we know that we can ignore changes to .gn* files. Also, for most .gn
// files, we can treat a change as simply affecting every target, config,
// or toolchain defined in that file.
if (AnyBuildFilesWereModified(inputs.source_files)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698