move strip switch behind option
parent
c87e3e98a3
commit
061a730dd3
12
build.zig
12
build.zig
|
|
@ -162,7 +162,11 @@ pub fn build(b: *std.Build) !void {
|
||||||
bool,
|
bool,
|
||||||
"strip",
|
"strip",
|
||||||
"Strip the final executable. Default true for fast and small releases",
|
"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 conformance = b.option(
|
||||||
[]const u8,
|
[]const u8,
|
||||||
|
|
@ -348,11 +352,7 @@ pub fn build(b: *std.Build) !void {
|
||||||
.root_source_file = b.path("src/main.zig"),
|
.root_source_file = b.path("src/main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
.strip = strip orelse switch (optimize) {
|
.strip = strip,
|
||||||
.Debug => false,
|
|
||||||
.ReleaseSafe => false,
|
|
||||||
.ReleaseFast, .ReleaseSmall => true,
|
|
||||||
},
|
|
||||||
}) else null;
|
}) else null;
|
||||||
|
|
||||||
// Exe
|
// Exe
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue