Skip to content

Commit 509d31a

Browse files
nastysNekotekina
authored andcommitted
Force ELF on macOS
1 parent 1c0ca19 commit 509d31a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎lib/Support/Triple.cpp‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,13 @@ static Triple::ObjectFormatType getDefaultFormat(const Triple &T) {
688688
case Triple::thumb:
689689
case Triple::x86:
690690
case Triple::x86_64:
691-
if (T.isOSDarwin())
692-
return Triple::MachO;
693-
else if (T.isOSWindows())
691+
// Workaround for macOS
692+
// LLVM fails to correctly set up trampolines with Mach-O,
693+
// so we just force LLVM to use ELF instead.
694+
//if (T.isOSDarwin())
695+
// return Triple::MachO;
696+
//else
697+
if (T.isOSWindows())
694698
return Triple::COFF;
695699
return Triple::ELF;
696700

0 commit comments

Comments
 (0)