Skip to content

Commit

Permalink
Enable the -fno-assume-unique-vtables flag is possible on clang, in o…
Browse files Browse the repository at this point in the history
…rder to work around likely buggy compiler optimisation.
  • Loading branch information
bluescarni committed Sep 28, 2024
1 parent ab88330 commit b4727e1
Showing 1 changed file with 12 additions and 0 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

0 comments on commit b4727e1

Please sign in to comment.