diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-03-13 14:46:53 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-03-13 14:46:53 -0400 |
| commit | 85d0f0d45bf1529db8965b8176f8021d1ca27534 (patch) | |
| tree | 7b919eae5611658bf0af9ffd9835a464344527b9 /src/codegen.cpp | |
| parent | d21370833352369867596305dda99f8cafc69277 (diff) | |
| download | zig-85d0f0d45bf1529db8965b8176f8021d1ca27534.tar.gz zig-85d0f0d45bf1529db8965b8176f8021d1ca27534.zip | |
fix @setRuntimeSafety not able to override release modes
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 22f3b5be09..9f7bef52cb 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -878,9 +878,6 @@ static bool ir_want_fast_math(CodeGen *g, IrInstruction *instruction) { } static bool ir_want_runtime_safety(CodeGen *g, IrInstruction *instruction) { - if (g->build_mode == BuildModeFastRelease || g->build_mode == BuildModeSmallRelease) - return false; - // TODO memoize Scope *scope = instruction->scope; while (scope) { @@ -895,7 +892,9 @@ static bool ir_want_runtime_safety(CodeGen *g, IrInstruction *instruction) { } scope = scope->parent; } - return true; + + return (g->build_mode != BuildModeFastRelease && + g->build_mode != BuildModeSmallRelease); } static Buf *panic_msg_buf(PanicMsgId msg_id) { |
