1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02: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::thumb:
case Triple::x86: case Triple::x86:
case Triple::x86_64: case Triple::x86_64:
if (T.isOSDarwin()) // Workaround for macOS
return Triple::MachO; // LLVM fails to correctly set up trampolines with Mach-O,
else if (T.isOSWindows()) // so we just force LLVM to use ELF instead.
//if (T.isOSDarwin())
// return Triple::MachO;
//else
if (T.isOSWindows())
return Triple::COFF; return Triple::COFF;
return Triple::ELF; return Triple::ELF;