just change fix the binary unconditionally - that was too confusing
This commit is contained in:
parent
f188afc25c
commit
e787e707cb
1 changed files with 9 additions and 14 deletions
23
build.zig
23
build.zig
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue