aboutsummaryrefslogtreecommitdiff
path: root/src/link
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-09-29 18:32:41 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-09-29 18:32:41 -0700
commit1572cd4d76dfa35e6a05bbb1405982d7fef6f833 (patch)
tree9fcbeff7b1cbc3e0ca3450feec5aad5e21138a7d /src/link
parentaf64fd2f424401ff66638696b35b1bf385c4b039 (diff)
downloadzig-1572cd4d76dfa35e6a05bbb1405982d7fef6f833.tar.gz
zig-1572cd4d76dfa35e6a05bbb1405982d7fef6f833.zip
different strategy to fix compiler_rt.zig and c.zig
with respect to std.builtin.link_libc. The commit 27e008eb292038c5a6b9a13b64c7b69d1525f690 did not solve the problem because although it got std.builtin.link_libc to be true for compiler_rt.zig and c.zig, it had other unintentional side effects which broke the build for -lc -target foo-linux-musl. This commit introduces a new flag to Compilation to allow setting this comptime flag to true without introducing other side effects to compilation and linking.
Diffstat (limited to 'src/link')
-rw-r--r--src/link/MachO.zig3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/link/MachO.zig b/src/link/MachO.zig
index 2570a92daa..4c0be32922 100644
--- a/src/link/MachO.zig
+++ b/src/link/MachO.zig
@@ -323,9 +323,6 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
const is_lib = self.base.options.output_mode == .Lib;
const is_dyn_lib = self.base.options.link_mode == .Dynamic and is_lib;
const is_exe_or_dyn_lib = is_dyn_lib or self.base.options.output_mode == .Exe;
- const have_dynamic_linker = self.base.options.link_libc and
- self.base.options.link_mode == .Dynamic and is_exe_or_dyn_lib;
- const link_in_crt = self.base.options.link_libc and self.base.options.output_mode == .Exe;
const target = self.base.options.target;
const stack_size = self.base.options.stack_size_override orelse 16777216;
const allow_shlib_undefined = self.base.options.allow_shlib_undefined orelse !self.base.options.is_native_os;