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

Unified Diff: tools/gn/setup.cc

Issue 137713007: Check for GN args using the union of all rather than individually. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/setup.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/setup.cc
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc
index ff82477ef6b06aa25276d84fb657fa28e4d1607a..9c0394800cf9714f40a22efb5f68c9a04d8a334c 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -125,7 +125,8 @@ CommonSetup::CommonSetup()
: build_settings_(),
loader_(new LoaderImpl(&build_settings_)),
builder_(new Builder(loader_.get())),
- check_for_bad_items_(true) {
+ check_for_bad_items_(true),
+ check_for_unused_overrides_(true) {
loader_->set_complete_callback(base::Bind(&DecrementWorkCount));
}
@@ -133,7 +134,8 @@ CommonSetup::CommonSetup(const CommonSetup& other)
: build_settings_(other.build_settings_),
loader_(new LoaderImpl(&build_settings_)),
builder_(new Builder(loader_.get())),
- check_for_bad_items_(other.check_for_bad_items_) {
+ check_for_bad_items_(other.check_for_bad_items_),
+ check_for_unused_overrides_(other.check_for_unused_overrides_) {
loader_->set_complete_callback(base::Bind(&DecrementWorkCount));
}
@@ -157,9 +159,13 @@ bool CommonSetup::RunPostMessageLoop() {
}
}
- if (!build_settings_.build_args().VerifyAllOverridesUsed(&err)) {
- err.PrintToStdout();
- return false;
+ if (check_for_unused_overrides_) {
+ if (!build_settings_.build_args().VerifyAllOverridesUsed(&err)) {
+ // TODO(brettw) implement a system of warnings. Until we have a better
+ // system, print the error but don't return failure.
+ err.PrintToStdout();
+ return true;
+ }
}
// Write out tracing and timing if requested.
« no previous file with comments | « tools/gn/setup.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698