Skip to content

Commit

Permalink
Merge pull request #450 from bluescarni/pr/code_model_fixes
Browse files Browse the repository at this point in the history
Disable the tiny codemodel on osx
  • Loading branch information
bluescarni authored Sep 9, 2024
2 parents 12609d7 + babb5fd commit 0f357fc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/llvm_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/llvm_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tools/gha_osx_arm64_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge
export deps_dir=$HOME/local
export PATH="$HOME/miniconda/bin:$PATH"
bash miniconda.sh -b -p $HOME/miniconda
mamba create -y -p $deps_dir c-compiler zlib cxx-compiler libcxx cmake ninja \
mamba create -y -p $deps_dir 'c-compiler<1.8' zlib 'cxx-compiler<1.8' libcxx cmake ninja \
llvmdev tbb-devel tbb libboost-devel sleef xtensor xtensor-blas blas \
blas-devel fmt spdlog 'mppp=1.*'
source activate $deps_dir
Expand Down
2 changes: 1 addition & 1 deletion tools/gha_osx_x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge
export deps_dir=$HOME/local
export PATH="$HOME/miniconda/bin:$PATH"
bash miniconda.sh -b -p $HOME/miniconda
mamba create -y -p $deps_dir c-compiler zlib cxx-compiler libcxx 'cmake>=3.18' ninja \
mamba create -y -p $deps_dir 'c-compiler<1.8' zlib 'cxx-compiler<1.8' libcxx cmake ninja \
llvmdev tbb-devel tbb libboost-devel sleef xtensor xtensor-blas blas \
blas-devel fmt spdlog 'mppp=1.*'
source activate $deps_dir
Expand Down
2 changes: 1 addition & 1 deletion tools/gha_osx_x86_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge
export deps_dir=$HOME/local
export PATH="$HOME/miniconda/bin:$PATH"
bash miniconda.sh -b -p $HOME/miniconda
mamba create -y -p $deps_dir c-compiler zlib cxx-compiler libcxx 'cmake>=3.18' ninja \
mamba create -y -p $deps_dir 'c-compiler<1.8' zlib 'cxx-compiler<1.8' libcxx cmake ninja \
llvmdev tbb-devel tbb libboost-devel sleef xtensor xtensor-blas blas \
blas-devel fmt spdlog 'mppp=1.*'
source activate $deps_dir
Expand Down

0 comments on commit 0f357fc

Please sign in to comment.