Skip to content

Commit

Permalink
Merge pull request #458 from bluescarni/pr/clang17_fix
Browse files Browse the repository at this point in the history
clang 17 workaround
  • Loading branch information
bluescarni authored Sep 28, 2024
2 parents ab88330 + 089782c commit badc46f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
12 changes: 12 additions & 0 deletions cmake/yacma/YACMACompilerLinkerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@ if(NOT _YACMACompilerLinkerSettingsRun)
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Warray-bounds-pointer-arithmetic)
# New warnings in clang 14.
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Warray-parameter)
# NOTE: clang 17 enables by default a new compiler flag called "-fassume-unique-vtables":
#
# https://releases.llvm.org/17.0.1/tools/clang/docs/ReleaseNotes.html#c-language-changes
#
# This flag however seems to be buggy:
#
# https://github.com/llvm/llvm-project/issues/71196
#
# On our part, in several projects we are experiencing Boost.serialization failures when
# (de)serialising derived objects through pointers to bases. Thus, we forcibly disable
# this new flag.
_YACMA_CHECK_ENABLE_CXX_FLAG(-fno-assume-unique-vtables)
endif()

# Common configuration for GCC, clang and Intel.
Expand Down
10 changes: 10 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Changelog
=========

6.0.1 (unreleased)
------------------

Fix
~~~

- Workaround for a clang 17 issue that would result in
runtime exceptions during (de)serialisation
(`#458 <https://github.com/bluescarni/heyoka/pull/458>`__).

6.0.0 (2024-09-21)
------------------

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
conda create -y -p $deps_dir 'c-compiler<1.8' zlib 'cxx-compiler<1.8' libcxx cmake ninja \
conda create -y -p $deps_dir c-compiler zlib cxx-compiler 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
4 changes: 2 additions & 2 deletions 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
conda create -y -p $deps_dir 'c-compiler<1.8' zlib 'cxx-compiler<1.8' libcxx cmake ninja \
conda create -y -p $deps_dir c-compiler zlib cxx-compiler 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 All @@ -25,7 +25,7 @@ unset CXXFLAGS
unset CFLAGS

# Configure.
CXX=clang++ CC=clang cmake ../ -G Ninja \
CXX=clang++ CC=clang cmake -G Ninja ../ \
-DCMAKE_PREFIX_PATH=$deps_dir \
-DCMAKE_BUILD_TYPE=Debug \
-DHEYOKA_BUILD_TESTS=yes \
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
conda create -y -p $deps_dir 'c-compiler<1.8' zlib 'cxx-compiler<1.8' libcxx cmake ninja \
conda create -y -p $deps_dir c-compiler zlib cxx-compiler 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 badc46f

Please sign in to comment.