From 6509ee6c9f56d1757e28b0efcc14047514edef7a Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Mon, 9 Sep 2024 16:02:47 +0200 Subject: [PATCH] Disable the tiny codemodel on osx. --- src/llvm_state.cpp | 6 +++++- test/llvm_state.cpp | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/llvm_state.cpp b/src/llvm_state.cpp index af5fc6d6d..8d4f45ff8 100644 --- a/src/llvm_state.cpp +++ b/src/llvm_state.cpp @@ -293,7 +293,11 @@ llvm::orc::JITTargetMachineBuilder create_jit_tmb(unsigned opt_level, code_model #if defined(HEYOKA_ARCH_X86) code_model::small, code_model::kernel, code_model::medium, code_model::large #elif defined(HEYOKA_ARCH_ARM) - code_model::tiny, code_model::small, code_model::large + // NOTE: tiny code model not supported on OSX. +#if !defined(__APPLE__) + code_model::tiny, +#endif + code_model::small, code_model::large #elif defined(HEYOKA_ARCH_PPC) code_model::small, code_model::medium, code_model::large #else diff --git a/test/llvm_state.cpp b/test/llvm_state.cpp index 821524df3..8acd5929e 100644 --- a/test/llvm_state.cpp +++ b/test/llvm_state.cpp @@ -444,8 +444,8 @@ TEST_CASE("code model") REQUIRE(oss.str() == "small"); } - // code_model::tiny not supported on x86 or ppc. -#if defined(HEYOKA_ARCH_X86) || defined(HEYOKA_ARCH_PPC) + // code_model::tiny not supported on x86 or ppc or OSX +#if defined(HEYOKA_ARCH_X86) || defined(HEYOKA_ARCH_PPC) || defined(__APPLE__) { std::ostringstream oss;