From 061a730dd37188c6b6aca7eac66f8d0a9bc108b3 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 31 Dec 2024 12:06:45 +0100 Subject: [PATCH] move strip switch behind option --- build.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.zig b/build.zig index 2f34a6667..dffaa8882 100644 --- a/build.zig +++ b/build.zig @@ -162,7 +162,11 @@ pub fn build(b: *std.Build) !void { bool, "strip", "Strip the final executable. Default true for fast and small releases", - ) orelse null; + ) orelse switch (optimize) { + .Debug => false, + .ReleaseSafe => false, + .ReleaseFast, .ReleaseSmall => true, + }; const conformance = b.option( []const u8, @@ -348,11 +352,7 @@ pub fn build(b: *std.Build) !void { .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, - .strip = strip orelse switch (optimize) { - .Debug => false, - .ReleaseSafe => false, - .ReleaseFast, .ReleaseSmall => true, - }, + .strip = strip, }) else null; // Exe