From e787e707cb5f7eb3c4a6b90abcda24bff5ac6a72 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Mon, 27 Oct 2025 14:42:17 -0700 Subject: [PATCH] just change fix the binary unconditionally - that was too confusing --- build.zig | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/build.zig b/build.zig index d824437..7e5d125 100644 --- a/build.zig +++ b/build.zig @@ -75,21 +75,16 @@ pub fn build(b: *std.Build) void { const install_exe = b.addInstallArtifact(exe, .{}); - // Fix NEEDED entries in release builds to make binary portable - if (optimize != .Debug) { - const script_path = b.pathFromRoot("fix_needed.sh"); - const fix_needed = b.addSystemCommand(&.{script_path}); - fix_needed.step.dependOn(&install_exe.step); - fix_needed.addFileInput(install_exe.emitted_bin.?); - fix_needed.has_side_effects = true; - _ = fix_needed.captureStdOut(); - b.getInstallStep().dependOn(&fix_needed.step); + const script_path = b.pathFromRoot("fix_needed.sh"); + const fix_needed = b.addSystemCommand(&.{script_path}); + fix_needed.step.dependOn(&install_exe.step); + fix_needed.addFileInput(install_exe.emitted_bin.?); + fix_needed.has_side_effects = true; + _ = fix_needed.captureStdOut(); + b.getInstallStep().dependOn(&fix_needed.step); - const fix_step = b.step("fix-needed", "Fix NEEDED entries to make binary portable"); - fix_step.dependOn(&fix_needed.step); - } else { - b.getInstallStep().dependOn(&install_exe.step); - } + const fix_step = b.step("fix-needed", "Fix NEEDED entries to make binary portable"); + fix_step.dependOn(&fix_needed.step); const run_step = b.step("run", "Run the app"); const run_cmd = b.addRunArtifact(exe);