@@ -158,6 +158,9 @@ Usage:
158
158
-unittest compile in unit tests
159
159
-v verbose
160
160
-vdmd print commands run by this script
161
+ -verrors=<num> limit the number of error messages (0 means unlimited)
162
+ -verrors=context (enabled by default) show diagnostic messages with context
163
+ -verrors=spec show errors from speculative compiles such as __traits(compiles,...)
161
164
--version print compiler version and exit
162
165
-version=level compile in version code >= level
163
166
-version=ident compile in version code identified by ident
@@ -442,6 +445,18 @@ while ( $arg_i < scalar(@ARGV) ) {
442
445
}
443
446
} elsif ( $arg =~ m / ^-v1$ / ) {
444
447
push @out , ' -fd-version=1' ;
448
+ } elsif ( $arg =~ m / ^-verrors$ / ) {
449
+ errorExit " switch -verrors expects a value" ;
450
+ } elsif ( $arg =~ m / ^-verrors=(\d *)$ / ) {
451
+ push @out , " -fmax-errors=" . ( $1 || 0 );
452
+ } elsif ( $arg =~ m / ^-verrors=(.+)$ / ) {
453
+ if ( $1 eq " context" ) {
454
+ # ignored
455
+ } elsif ( $1 eq " spec" ) {
456
+ push @out , ' -Wspeculative' ;
457
+ } else {
458
+ errorExit " unrecongnized value passed to -verrors '$1 '" ;
459
+ }
445
460
} elsif ( $arg =~ m / ^--version$ / ) {
446
461
$print_version = 1;
447
462
} elsif ( $arg =~ m / ^-version=(.*)$ / ) {
0 commit comments