authorgravatar for rpkak@noreply.codeberg.orgrpkak <rpkak@noreply.codeberg.org> 2026-10-10 09:41:19+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-12 10:58:50+02:00
log40fd34fe7bd7b5c3fdbc2804f7b39bdf02d09aff
treea2d5661a5097b0beb8ce8cb3447328c936de1744
parent070276d8f16667233e9d3a450a4e8d6db9183958

build.zig: enable debug extensions if optimize is null


1 files changed, 2 insertions(+), 2 deletions(-)

build.zig+2-2
......@@ -206,7 +206,7 @@ pub fn build(b: *std.Build) !void {
206206
207207 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: {
208208 if (strip == true) break :blk @as(u32, 0);
209 if (optimize != .debug) break :blk 0;
209 if (optimize) |opt| if (opt != .debug) break :blk 0;
210210 break :blk 4;
211211 };
212212
......@@ -255,7 +255,7 @@ pub fn build(b: *std.Build) !void {
255255 exe.root_module.link_libc = true;
256256 }
257257
258 const is_debug = optimize == .debug;
258 const is_debug = if (optimize) |opt| opt == .debug else true;
259259 const enable_debug_extensions = b.option(bool, "debug-extensions", "Enable commands and options useful for debugging the compiler") orelse is_debug;
260260 const enable_logging = b.option(bool, "log", "Enable debug logging with --debug-log") orelse is_debug;
261261