summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2024-12-29 22:06:30 +0100
committerJan200101 <sentrycraft123@gmail.com>2024-12-29 22:06:30 +0100
commit2bb3353672bde4dc34f4c1af82ff9c303dd18292 (patch)
tree71a6e18f3298fb8296d9a390951835444a527f24 /build.zig
parent6508fec945258f526e0adf0dcc174d954e23fb8d (diff)
add option to strip build regardless of optimization
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index c9ab5dd8f..eb34788bf 100644
--- a/build.zig
+++ b/build.zig
@@ -158,6 +158,12 @@ pub fn build(b: *std.Build) !void {
"Build a Position Independent Executable. Default true for system packages.",
) orelse system_package;
+ const strip = b.option(
+ bool,
+ "strip",
+ "Build the website data for the website.",
+ ) orelse null;
+
const conformance = b.option(
[]const u8,
"conformance",
@@ -342,7 +348,7 @@ pub fn build(b: *std.Build) !void {
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
- .strip = switch (optimize) {
+ .strip = strip orelse switch (optimize) {
.Debug => false,
.ReleaseSafe => false,
.ReleaseFast, .ReleaseSmall => true,