| ... | @@ -206,7 +206,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -206,7 +206,7 @@ pub fn build(b: *std.Build) !void { |
| 206 | | 206 | |
| 207 | const mem_leak_frames: u32 = b.option(u32, "mem-leak-frames", "How many stack frames to print when a memory leak occurs. Tests get 2x this amount.") orelse blk: { | 207 | const mem_leak_frames: u32 = b.option(u32, "mem-leak-frames", "How many stack frames to print when a memory leak occurs. Tests get 2x this amount.") orelse blk: { |
| 208 | if (strip == true) break :blk @as(u32, 0); | 208 | if (strip == true) break :blk @as(u32, 0); |
| 209 | if (optimize) |opt| if (opt != .debug) break :blk 0; | 209 | if (optimize != .debug) break :blk 0; |
| 210 | break :blk 4; | 210 | break :blk 4; |
| 211 | }; | 211 | }; |
| 212 | | 212 | |
| ... | @@ -255,7 +255,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -255,7 +255,7 @@ pub fn build(b: *std.Build) !void { |
| 255 | exe.root_module.link_libc = true; | 255 | exe.root_module.link_libc = true; |
| 256 | } | 256 | } |
| 257 | | 257 | |
| 258 | const is_debug = if (optimize) |opt| opt == .debug else true; | 258 | const is_debug = optimize == .debug; |
| 259 | const enable_debug_extensions = b.option(bool, "debug-extensions", "Enable commands and options useful for debugging the compiler") orelse is_debug; | 259 | const enable_debug_extensions = b.option(bool, "debug-extensions", "Enable commands and options useful for debugging the compiler") orelse is_debug; |
| 260 | const enable_logging = b.option(bool, "log", "Enable debug logging with --debug-log") orelse is_debug; | 260 | const enable_logging = b.option(bool, "log", "Enable debug logging with --debug-log") orelse is_debug; |
| 261 | | 261 | |