We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No longer able to build on latest Zig - ziglang/zig#18160
The text was updated successfully, but these errors were encountered:
This is working for me but it may but removes the platform check that would prevent building on MacOS
diff --git a/build.zig b/build.zig index 263a1f9..b2622e7 100644 --- a/build.zig +++ b/build.zig @@ -7,15 +7,14 @@ pub fn build(b: *std.Build) void { const exe = b.addExecutable(.{ .name = "poop", .root_source_file = .{ .path = "src/main.zig" }, + .strip = b.option(bool, "strip", "strip the binary") orelse switch (optimize) { + .Debug, .ReleaseSafe => false, + .ReleaseFast, .ReleaseSmall => true, + }, .target = target, .optimize = optimize, }); - exe.strip = b.option(bool, "strip", "strip the binary") orelse switch (optimize) { - .Debug, .ReleaseSafe => false, - .ReleaseFast, .ReleaseSmall => true, - }; - b.installArtifact(exe); const release = b.step("release", "make an upstream binary release"); @@ -26,12 +25,9 @@ pub fn build(b: *std.Build) void { const rel_exe = b.addExecutable(.{ .name = "poop", .root_source_file = .{ .path = "src/main.zig" }, - .target = std.zig.CrossTarget.parse(.{ - .arch_os_abi = target_string, - }) catch unreachable, + .target = target, .optimize = .ReleaseSafe, }); - rel_exe.strip = true; const install = b.addInstallArtifact(rel_exe, .{}); install.dest_dir = .prefix;
Sorry, something went wrong.
719b0db
No branches or pull requests
No longer able to build on latest Zig - ziglang/zig#18160
The text was updated successfully, but these errors were encountered: