Commit f87424ab63

Jakub Konka <kubkon@jakubkonka.com>
2021-07-14 13:14:41
zld: invoke traditional linker if has LLVM as a temp measure
1 parent 9ca69c5
Changed files (2)
src/link/MachO.zig
@@ -434,7 +434,7 @@ pub fn flush(self: *MachO, comp: *Compilation) !void {
         }
     }
 
-    if (build_options.have_llvm and self.base.options.use_lld) {
+    if (build_options.have_llvm) {
         return self.linkWithZld(comp);
     } else {
         switch (self.base.options.effectiveOutputMode()) {
src/Compilation.zig
@@ -907,9 +907,10 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
             break :blk false;
         };
 
-        const darwin_can_use_system_sdk = comptime std.Target.current.isDarwin() and
-            std.builtin.os.tag == .macos and
-            options.target.isDarwin();
+        const darwin_can_use_system_sdk = blk: {
+            if (comptime !std.Target.current.isDarwin()) break :blk false;
+            break :blk std.builtin.os.tag == .macos and options.target.isDarwin();
+        };
 
         const sysroot = blk: {
             if (options.sysroot) |sysroot| {