diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-06-29 07:59:46 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-06-29 07:59:46 +0200 |
| commit | 75a13a456b2cec9a81b9dabf54014f0e2a072c67 (patch) | |
| tree | 3ba86161bae27e232c206e13a37552d7884e44c1 /src/Compilation.zig | |
| parent | 2c385e58f96ea080bd6c732de422f84c6c38c2a2 (diff) | |
| download | zig-75a13a456b2cec9a81b9dabf54014f0e2a072c67.tar.gz zig-75a13a456b2cec9a81b9dabf54014f0e2a072c67.zip | |
zld: remove system linker hack and lld hooks
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index f202034242..e0e4b8ae79 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -880,24 +880,16 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { break :blk false; }; - const darwin_can_use_system_linker_and_sdk = + const darwin_can_use_system_sdk = // comptime conditions ((build_options.have_llvm and comptime std.Target.current.isDarwin()) and // runtime conditions (use_lld and std.builtin.os.tag == .macos and options.target.isDarwin())); - const darwin_system_linker_hack = blk: { - if (darwin_can_use_system_linker_and_sdk) { - break :blk std.os.getenv("ZIG_SYSTEM_LINKER_HACK") != null; - } else { - break :blk false; - } - }; - const sysroot = blk: { if (options.sysroot) |sysroot| { break :blk sysroot; - } else if (darwin_can_use_system_linker_and_sdk) { + } else if (darwin_can_use_system_sdk) { // TODO Revisit this targeting versions lower than macOS 11 when LLVM 12 is out. // See https://github.com/ziglang/zig/issues/6996 const at_least_big_sur = options.target.os.getVersionRange().semver.min.major >= 11; @@ -916,8 +908,6 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { break :blk false; } else if (options.c_source_files.len == 0) { break :blk false; - } else if (darwin_system_linker_hack) { - break :blk false; } else switch (options.output_mode) { .Lib, .Obj => break :blk false, .Exe => switch (options.optimize_mode) { @@ -1296,7 +1286,6 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { .optimize_mode = options.optimize_mode, .use_lld = use_lld, .use_llvm = use_llvm, - .system_linker_hack = darwin_system_linker_hack, .link_libc = link_libc, .link_libcpp = link_libcpp, .link_libunwind = link_libunwind, |
