From 75a13a456b2cec9a81b9dabf54014f0e2a072c67 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Tue, 29 Jun 2021 07:59:46 +0200 Subject: zld: remove system linker hack and lld hooks --- src/Compilation.zig | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/Compilation.zig') 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, -- cgit v1.2.3