Skip to content

Commit a258d22

Browse files
committed
compileroptions.cmake: added workaround for current performance regression in clang-14
1 parent 88f26a5 commit a258d22

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cmake/compileroptions.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
5151
add_compile_options(-Wsuggest-attribute=noreturn)
5252
add_compile_options(-Wno-shadow) # whenever a local variable or type declaration shadows another one
5353
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
54+
if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 14)
55+
if (CMAKE_BUILD_TYPE MATCHES "Release" OR CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
56+
# work around performance regression - see https://github.com/llvm/llvm-project/issues/53555
57+
add_compile_options(-mllvm -inline-deferral)
58+
endif()
59+
endif()
5460

5561
add_compile_options_safe(-Wno-documentation-unknown-command)
5662

0 commit comments

Comments
 (0)