Skip to content

Commit f0ebaf9

Browse files
authored
compileroptions.cmake: fixed workaround for Clang >= 14 (#4737)
1 parent 367847c commit f0ebaf9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cmake/compileroptions.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5858
# TODO: verify this regression still exists in clang-15
5959
if (CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
6060
# work around performance regression - see https://github.com/llvm/llvm-project/issues/53555
61-
add_compile_options_safe(-mllvm -inline-deferral)
61+
check_cxx_compiler_flag("-mllvm -inline-deferral" _has_mllvm_inline_deferral)
62+
if (_has_mllvm_inline_deferral)
63+
add_compile_options(-mllvm -inline-deferral)
64+
endif()
6265
endif()
6366

6467
# use force DWARF 4 debug format since not all tools might be able to handle DWARF 5 yet - e.g. valgrind on ubuntu 20.04

0 commit comments

Comments
 (0)