mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 00:55:49 +03:00
Fix setting D_NoBoundsChecks for -boundscheck=off builds
This commit is contained in:
parent
2d597ac1f0
commit
d85d256776
1 changed files with 2 additions and 2 deletions
|
@ -432,7 +432,7 @@ static void parseCommandLine(int argc, char **argv, Strings &sourceFiles, bool &
|
|||
if (global.params.useUnitTests)
|
||||
global.params.useAssert = 1;
|
||||
|
||||
// -release downgrades default bounds checking level to BC_SafeOnly (only for safe functions).
|
||||
// -release downgrades default bounds checking level to BOUNDSCHECKsafeonly (only for safe functions).
|
||||
global.params.useArrayBounds = opts::nonSafeBoundsChecks ? BOUNDSCHECKon : BOUNDSCHECKsafeonly;
|
||||
if (opts::boundsCheck != BOUNDSCHECKdefault)
|
||||
global.params.useArrayBounds = opts::boundsCheck;
|
||||
|
@ -826,7 +826,7 @@ static void registerPredefinedVersions() {
|
|||
if (global.params.useAssert)
|
||||
VersionCondition::addPredefinedGlobalIdent("assert");
|
||||
|
||||
if (!global.params.useArrayBounds)
|
||||
if (global.params.useArrayBounds == BOUNDSCHECKoff)
|
||||
VersionCondition::addPredefinedGlobalIdent("D_NoBoundsChecks");
|
||||
|
||||
registerPredefinedTargetVersions();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue