just change fix the binary unconditionally - that was too confusing

This commit is contained in:
Emil Lerch 2025-10-27 14:42:17 -07:00
parent f188afc25c
commit e787e707cb
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -75,21 +75,16 @@ pub fn build(b: *std.Build) void {
const install_exe = b.addInstallArtifact(exe, .{}); const install_exe = b.addInstallArtifact(exe, .{});
// Fix NEEDED entries in release builds to make binary portable const script_path = b.pathFromRoot("fix_needed.sh");
if (optimize != .Debug) { const fix_needed = b.addSystemCommand(&.{script_path});
const script_path = b.pathFromRoot("fix_needed.sh"); fix_needed.step.dependOn(&install_exe.step);
const fix_needed = b.addSystemCommand(&.{script_path}); fix_needed.addFileInput(install_exe.emitted_bin.?);
fix_needed.step.dependOn(&install_exe.step); fix_needed.has_side_effects = true;
fix_needed.addFileInput(install_exe.emitted_bin.?); _ = fix_needed.captureStdOut();
fix_needed.has_side_effects = true; b.getInstallStep().dependOn(&fix_needed.step);
_ = fix_needed.captureStdOut();
b.getInstallStep().dependOn(&fix_needed.step);
const fix_step = b.step("fix-needed", "Fix NEEDED entries to make binary portable"); const fix_step = b.step("fix-needed", "Fix NEEDED entries to make binary portable");
fix_step.dependOn(&fix_needed.step); fix_step.dependOn(&fix_needed.step);
} else {
b.getInstallStep().dependOn(&install_exe.step);
}
const run_step = b.step("run", "Run the app"); const run_step = b.step("run", "Run the app");
const run_cmd = b.addRunArtifact(exe); const run_cmd = b.addRunArtifact(exe);