diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-06-30 00:03:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-30 00:03:55 +0200 |
| commit | 81bf05bf6c1249c39273b494d3e337d300b4ddd5 (patch) | |
| tree | 9b53744d1d3a31ac82e153173bb9abe7bb52c999 /src/Compilation.zig | |
| parent | 37fbf5b0d3b0be131903e4895ee3703393b32d8f (diff) | |
| parent | 0e15205521b9a8c95db3c1714dffe3be1df5cda1 (diff) | |
| download | zig-81bf05bf6c1249c39273b494d3e337d300b4ddd5.tar.gz zig-81bf05bf6c1249c39273b494d3e337d300b4ddd5.zip | |
Merge pull request #9266 from ziglang/zld-dylibs
zig ld can create dylibs now; remove system linker hack and any mention of ld64.lld from the codebase
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 10b2a9af11..890100b996 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -879,24 +879,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; @@ -915,8 +907,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) { @@ -1295,7 +1285,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, |
