* options.h (class General_options): Add --fatal-warnings.
* main.cc (main): Implement --fatal-warnings. * errors.h (Errors::warning_count): New function.
This commit is contained in:
parent
f1f70eae28
commit
d82a5bcc85
4 changed files with 18 additions and 0 deletions
|
@ -220,6 +220,11 @@ main(int argc, char** argv)
|
|||
layout.print_stats();
|
||||
}
|
||||
|
||||
if (parameters->options().fatal_warnings()
|
||||
&& errors.warning_count() > 0
|
||||
&& errors.error_count() == 0)
|
||||
gold_error("treating warnings as errors");
|
||||
|
||||
// If the user used --noinhibit-exec, we force the exit status to be
|
||||
// successful. This is compatible with GNU ld.
|
||||
gold_exit(errors.error_count() == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue