Indicate 'exiting due to errors' if errors, not warnings.
This commit is contained in:
parent
85a37ea53f
commit
7654add5e5
2
Changes
2
Changes
|
|
@ -10,6 +10,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||||
|
|
||||||
**** Search for user -y paths before default current directory. [Ruben Diez]
|
**** Search for user -y paths before default current directory. [Ruben Diez]
|
||||||
|
|
||||||
|
**** Indicate 'exiting due to errors' if errors, not warnings. [Ruben Diez]
|
||||||
|
|
||||||
**** Fix reporting not found modules if generate-off, bug403. [Jeremy Bennett]
|
**** Fix reporting not found modules if generate-off, bug403. [Jeremy Bennett]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -973,8 +973,8 @@ is an alias for GCC compatibility.
|
||||||
|
|
||||||
Verilator defaults to the current directory ("-y .") and any specified
|
Verilator defaults to the current directory ("-y .") and any specified
|
||||||
--Mdir, though these default paths are used after any user specified
|
--Mdir, though these default paths are used after any user specified
|
||||||
directories. This allows "-y `pwd`" to be used if absolute filenames are
|
directories. This allows '-y "$(pwd)"' to be used if absolute filenames
|
||||||
desired for error messages instead of relative filenames.
|
are desired for error messages instead of relative filenames.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -332,13 +332,18 @@ void V3Error::incErrors() {
|
||||||
|
|
||||||
void V3Error::abortIfErrors() {
|
void V3Error::abortIfErrors() {
|
||||||
if (errorCount()) {
|
if (errorCount()) {
|
||||||
v3fatal ("Exiting due to "<<dec<<errorOrWarnCount()<<" warning(s)\n");
|
abortIfWarnings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Error::abortIfWarnings() {
|
void V3Error::abortIfWarnings() {
|
||||||
if (v3Global.opt.warnFatal() ? errorOrWarnCount() : errorCount()) {
|
bool exwarn = v3Global.opt.warnFatal() && warnCount();
|
||||||
v3fatal ("Exiting due to "<<dec<<errorOrWarnCount()<<" warning(s)\n");
|
if (errorCount() && exwarn) {
|
||||||
|
v3fatal ("Exiting due to "<<dec<<errorCount()<<" error(s), "<<warnCount()<<" warning(s)\n");
|
||||||
|
} else if (errorCount()) {
|
||||||
|
v3fatal ("Exiting due to "<<dec<<errorCount()<<" error(s)\n");
|
||||||
|
} else if (exwarn) {
|
||||||
|
v3fatal ("Exiting due to "<<dec<<warnCount()<<" warning(s)\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue