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
|
} |
} |