authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-07-14 13:14:41+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-07-15 18:49:47+02:00
logf87424ab6393c3208d96a4f078c71f745a37c84b
treefcd32a26dd591920e796e7b74789fab63de34570
parent9ca69c51e76525e1e753588375036ea711f72df0

zld: invoke traditional linker if has LLVM as a temp measure


2 files changed, 5 insertions(+), 4 deletions(-)

src/Compilation.zig+4-3
......@@ -907,9 +907,10 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
907907 break :blk false;
908908 };
909909
910 const darwin_can_use_system_sdk = comptime std.Target.current.isDarwin() and
911 std.builtin.os.tag == .macos and
912 options.target.isDarwin();
910 const darwin_can_use_system_sdk = blk: {
911 if (comptime !std.Target.current.isDarwin()) break :blk false;
912 break :blk std.builtin.os.tag == .macos and options.target.isDarwin();
913 };
913914
914915 const sysroot = blk: {
915916 if (options.sysroot) |sysroot| {
src/link/MachO.zig+1-1
......@@ -434,7 +434,7 @@ pub fn flush(self: *MachO, comp: *Compilation) !void {
434434 }
435435 }
436436
437 if (build_options.have_llvm and self.base.options.use_lld) {
437 if (build_options.have_llvm) {
438438 return self.linkWithZld(comp);
439439 } else {
440440 switch (self.base.options.effectiveOutputMode()) {