From d2614d01fd09fc052205a203706fbbe8fc3e9aca Mon Sep 17 00:00:00 2001 From: sguo35 Date: Fri, 17 Jun 2022 12:25:38 -0700 Subject: [PATCH] [ppu] fix a macOS arm64 regression Always override the LLVM triple to prevent linking errors. --- Utilities/JIT.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Utilities/JIT.cpp b/Utilities/JIT.cpp index 1b751153df..68ab341af5 100644 --- a/Utilities/JIT.cpp +++ b/Utilities/JIT.cpp @@ -871,6 +871,10 @@ jit_compiler::jit_compiler(const std::unordered_map& _link, co std::string result; auto null_mod = std::make_unique ("null_", *m_context); +#if defined(__APPLE__) && defined(ARCH_ARM64) + // Force override triple on Apple arm64 or we'll get linking errors. + null_mod->setTargetTriple(llvm::Triple::normalize(utils::c_llvm_default_triple)); +#endif if (_link.empty()) {