diff options
author | 2023-02-24 17:37:45 -0600 | |
---|---|---|
committer | 2023-02-24 15:37:45 -0800 | |
commit | 4c4da4aae2c6e085974e26aecc0a96b7a94694af (patch) | |
tree | 9d14f9fcd27965e63e5643e45f3c92fd51174239 | |
parent | 3264ca991e809dfb7326e3aa050d17f1e68cc8bf (diff) | |
download | bun-4c4da4aae2c6e085974e26aecc0a96b7a94694af.tar.gz bun-4c4da4aae2c6e085974e26aecc0a96b7a94694af.tar.zst bun-4c4da4aae2c6e085974e26aecc0a96b7a94694af.zip |
fix(zig-build): disable stack probing when building other objs too (#2165)
-rw-r--r-- | build.zig | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -314,7 +314,7 @@ pub fn build(b: *Build) !void { obj.bundle_compiler_rt = false; obj.omit_frame_pointer = optimize != .Debug; - // Disable staack probing on x86 so we don't need to include compiler_rt + // Disable stack probing on x86 so we don't need to include compiler_rt if (target.getCpuArch().isX86()) obj.disable_stack_probing = true; if (b.option(bool, "for-editor", "Do not emit bin, just check for errors") orelse false) { @@ -597,6 +597,10 @@ pub fn configureObjectStep(b: *std.build.Builder, obj: *CompileStep, comptime Ta if (target.getOsTag() != .freestanding) obj.linkLibC(); if (target.getOsTag() != .freestanding) obj.bundle_compiler_rt = false; + // Disable stack probing on x86 so we don't need to include compiler_rt + // Needs to be disabled here too so headers object will build without the `__zig_probe_stack` symbol + if (target.getCpuArch().isX86()) obj.disable_stack_probing = true; + if (target.getOsTag() == .linux) { // obj.want_lto = tar; obj.link_emit_relocs = true; |