Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to strip build regardless of optimization #3945

Merged
merged 4 commits into from
Jan 2, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down