Skip to content

Commit

Permalink
Add support for LLVM 19.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescarni committed Sep 18, 2024
1 parent 7c01a83 commit 44e2d0f
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/gha_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ jobs:
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha_conda_ubsan.sh
conda_llvm18_asan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha_llvm18_conda_asan.sh
conda_llvm17_asan:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ endif()
include(GNUInstallDirs)
find_package(LLVM REQUIRED CONFIG)

if(${LLVM_VERSION_MAJOR} LESS 15 OR ${LLVM_VERSION_MAJOR} GREATER 18)
message(FATAL_ERROR "LLVM >= 15 and <= 18 is required.")
if(${LLVM_VERSION_MAJOR} LESS 15 OR ${LLVM_VERSION_MAJOR} GREATER 19)
message(FATAL_ERROR "LLVM >= 15 and <= 19 is required.")
endif()

# List of source files.
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changelog
New
~~~

- Support LLVM 19 (`#455 <https://github.com/bluescarni/heyoka/pull/455>`__).
- Non-number exponents for the ``pow()`` function
are now supported in Taylor integrators
(`#454 <https://github.com/bluescarni/heyoka/pull/454>`__).
Expand Down
2 changes: 1 addition & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and several CPU architectures (x86-64, 64-bit ARM and 64-bit PowerPC).

heyoka has the following **mandatory** dependencies:

* the `LLVM <https://llvm.org/>`__ compiler infrastructure library (version >=15 and <=18),
* the `LLVM <https://llvm.org/>`__ compiler infrastructure library (version >=15 and <=19),
* the `Boost <https://www.boost.org/>`__ C++ libraries (version >=1.69),
* the `{fmt} <https://fmt.dev/latest/index.html>`__ library (version >=9 and <=11),
* the `spdlog <https://github.com/gabime/spdlog>`__ library,
Expand Down
Empty file modified tools/gha_conda_clang_tidy.sh
100755 → 100644
Empty file.
Empty file modified tools/gha_conda_ubsan.sh
100755 → 100644
Empty file.
Empty file modified tools/gha_llvm16_conda_asan.sh
100755 → 100644
Empty file.
Empty file modified tools/gha_llvm17_conda_asan.sh
100755 → 100644
Empty file.
48 changes: 48 additions & 0 deletions tools/gha_llvm18_conda_asan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

# Echo each command
set -x

# Exit on error.
set -e

# Core deps.
sudo apt-get install wget

# Install conda+deps.
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O miniconda.sh
export deps_dir=$HOME/local
export PATH="$HOME/miniconda/bin:$PATH"
bash miniconda.sh -b -p $HOME/miniconda
conda create -y -p $deps_dir c-compiler cxx-compiler cmake ninja 'llvmdev=18.*' \
tbb-devel tbb libboost-devel 'mppp=1.*' sleef xtensor xtensor-blas blas \
blas-devel fmt spdlog
source activate $deps_dir

# Create the build dir and cd into it.
mkdir build
cd build

# Clear the compilation flags set up by conda.
unset CXXFLAGS
unset CFLAGS

# Configure.
cmake ../ -G Ninja \
-DCMAKE_PREFIX_PATH=$deps_dir \
-DCMAKE_BUILD_TYPE=Debug \
-DHEYOKA_BUILD_TESTS=yes \
-DHEYOKA_BUILD_TUTORIALS=ON \
-DHEYOKA_WITH_MPPP=yes \
-DHEYOKA_WITH_SLEEF=yes \
-DCMAKE_CXX_FLAGS="-fsanitize=address" \
-DCMAKE_CXX_FLAGS_DEBUG="-g -Og"

# Build.
ninja -v

# Run the tests.
ctest -VV -j4

set +e
set +x

0 comments on commit 44e2d0f

Please sign in to comment.