Revert "build.zig: enable debug extensions if optimize is null"

This reverts commit 40fd34fe7b.

This should have been included also in previous commit.
This commit is contained in:
Andrew Kelley committed 2026-10-17 12:47:45 -07:00
1 parent 21141cb88a
commit 722aa2a8ab
1 file changed
+2 -2
+2 -2
View File
@@ -206,7 +206,7 @@ pub fn build(b: *std.Build) !void {
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: {
if (strip == true) break :blk @as(u32, 0);
if (optimize) |opt| if (opt != .debug) break :blk 0;
if (optimize != .debug) break :blk 0;
break :blk 4;
};
@@ -255,7 +255,7 @@ pub fn build(b: *std.Build) !void {
exe.root_module.link_libc = true;
}
const is_debug = if (optimize) |opt| opt == .debug else true;
const is_debug = optimize == .debug;
const enable_debug_extensions = b.option(bool, "debug-extensions", "Enable commands and options useful for debugging the compiler") orelse is_debug;
const enable_logging = b.option(bool, "log", "Enable debug logging with --debug-log") orelse is_debug;