adjust build.zig for zig 0.9.0 >= c5d412268
This commit is contained in:
parent
fe7e37b71a
commit
9a0908bc63
20
build.zig
20
build.zig
|
@ -30,21 +30,13 @@ pub fn build(b: *Builder) void {
|
||||||
exe.linkSystemLibrary("c");
|
exe.linkSystemLibrary("c");
|
||||||
exe.setTarget(target);
|
exe.setTarget(target);
|
||||||
exe.setBuildMode(mode);
|
exe.setBuildMode(mode);
|
||||||
exe.override_dest_dir = .{ .Custom = ".." };
|
|
||||||
|
|
||||||
// TODO: Figure out -static
|
// This line works as of c5d412268
|
||||||
// Neither of these two work
|
// Earliest nightly is 05b5e49bc on 2021-06-12
|
||||||
// exe.addCompileFlags([][]const u8{
|
// https://ziglang.org/builds/zig-linux-x86_64-0.9.0-dev.113+05b5e49bc.tar.xz
|
||||||
// "-static",
|
// exe.override_dest_dir = .{ .Custom = ".." };
|
||||||
// "--strip",
|
exe.override_dest_dir = .{ .custom = ".." };
|
||||||
// });
|
exe.linkage = .static;
|
||||||
//
|
|
||||||
// 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;
|
|
||||||
|
|
||||||
exe.strip = true;
|
exe.strip = true;
|
||||||
exe.install();
|
exe.install();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user