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

Unified Diff: tools/gn/setup.cc

Issue 1907613002: GN flag to fail for unused build args. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/docs/reference.md ('k') | tools/gn/switches.h » ('j') | 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 384a2af17eaaa00368fbc8d0dfccc64f1fd2df86..7f8e28685dc6fe9117e427183e0b9f4f82bc8550 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -332,9 +332,13 @@ bool Setup::RunPostMessageLoop() {
}
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.
+ // TODO(brettw) implement a system to have a different marker for
+ // warnings. Until we have a better system, print the error but don't
+ // return failure unless requested on the command line.
err.PrintToStdout();
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kFailOnUnusedArgs))
+ return false;
return true;
Dirk Pranke 2016/04/23 01:27:17 I actually feel (reasonably strongly) that we shou
}
}
« no previous file with comments | « tools/gn/docs/reference.md ('k') | tools/gn/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698