diff --git a/build.zig b/build.zig index d813ad5..9de709f 100644 --- a/build.zig +++ b/build.zig @@ -30,21 +30,13 @@ pub fn build(b: *Builder) void { exe.linkSystemLibrary("c"); exe.setTarget(target); exe.setBuildMode(mode); - exe.override_dest_dir = .{ .Custom = ".." }; - // TODO: Figure out -static - // Neither of these two work - // exe.addCompileFlags([][]const u8{ - // "-static", - // "--strip", - // }); - // - // To compile on stock 0.8.0, comment this line of code, or use the Makefile - // See https://github.com/ziglang/zig/pull/8248 - // - // On a musl-based x86_64 system, this pre-compiled zig can be used: - // https://github.com/elerch/zig/releases/download/0.8.0/zig-0.8.0-static-support-musl-libz.tgz - exe.is_static = true; + // This line works as of c5d412268 + // Earliest nightly is 05b5e49bc on 2021-06-12 + // https://ziglang.org/builds/zig-linux-x86_64-0.9.0-dev.113+05b5e49bc.tar.xz + // exe.override_dest_dir = .{ .Custom = ".." }; + exe.override_dest_dir = .{ .custom = ".." }; + exe.linkage = .static; exe.strip = true; exe.install();