Skip to content

Commit 3527ddf

Browse files
the-horoibuclaw
authored andcommitted
Support -boundscheck
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
1 parent 3d66f48 commit 3527ddf

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

dmd-script

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ Usage:
109109
\@cmdfile read arguments from cmdfile
110110
-allinst generate code for all template instantiations
111111
-arch ... pass an -arch ... option to gdc
112+
-boundscheck=value bounds checks on, in \@safe only, or off
112113
-c do not link
113114
-cov do code coverage analysis
114115
-D generate documentation
@@ -335,6 +336,8 @@ while ( $arg_i < scalar(@ARGV) ) {
335336
push @out, '-arch', $ARGV[$arg_i++];
336337
} elsif ( $arg =~ m/^(-betterC|-vcolumns)$/ ) {
337338
# ignored
339+
} elsif ( $arg =~ m/^-boundscheck=(.*)$/ ) {
340+
push @out, "-fbounds-check=$1"
338341
} elsif ($arg =~ m/^-c$/ ) {
339342
$link = 0;
340343
} elsif ( $arg eq '-cov' ) {

dmd-script.1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Library files to link in
1919
generate code for all template instantiations
2020
.IP "-arch ..."
2121
pass -arch option to gdc
22+
.IP -boundscheck=[on|safeonly|off]
23+
bounds checks on, in @safe only, or off
2224
.IP -c
2325
compile only, do not link
2426
.IP -cov

0 commit comments

Comments
 (0)