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

This commit is contained in:
Jakub Konka 2021-07-14 13:14:41 +02:00
parent 9ca69c51e7
commit f87424ab63
2 changed files with 5 additions and 4 deletions

View File

@ -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| {

View File

@ -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()) {