add no-bin option as recommended in zig 0.14.0 rlease notes

https://ziglang.org/download/0.14.0/release-notes.html\#Incremental-Compilation
This commit is contained in:
Emil Lerch 2025-03-23 16:24:20 -07:00
parent 8421fd9e55
commit e0e09fb19e
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -34,12 +34,12 @@ pub fn build(b: *Builder) !void {
"no-llvm",
"Disable LLVM",
) orelse false;
const broken_windows = b.option(
bool,
"broken-windows",
"Windows is broken in this environment (do not run Windows tests)",
) orelse false;
const no_bin = b.option(bool, "no-bin", "skip emitting binary") orelse false;
// TODO: Embed the current git version in the code. We can do this
// by looking for .git/HEAD (if it exists, follow the ref to /ref/heads/whatevs,
// grab that commit, and use b.addOptions/exe.addOptions to generate the
@ -218,5 +218,9 @@ pub fn build(b: *Builder) !void {
const run_smoke_test = b.addRunArtifact(smoke_test);
smoke_test_step.dependOn(&run_smoke_test.step);
if (no_bin) {
b.getInstallStep().dependOn(&exe.step);
} else {
b.installArtifact(exe);
}
}