1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

Force ELF on macOS

This commit is contained in:
nastys 2021-12-31 17:43:23 +01:00 committed by Ivan
parent 1c0ca194dc
commit 509d31ad89

View File

@ -688,9 +688,13 @@ static Triple::ObjectFormatType getDefaultFormat(const Triple &T) {
case Triple::thumb:
case Triple::x86:
case Triple::x86_64:
if (T.isOSDarwin())
return Triple::MachO;
else if (T.isOSWindows())
// Workaround for macOS
// LLVM fails to correctly set up trampolines with Mach-O,
// so we just force LLVM to use ELF instead.
//if (T.isOSDarwin())
// return Triple::MachO;
//else
if (T.isOSWindows())
return Triple::COFF;
return Triple::ELF;