diff --git a/cmake/mode.RelWithDebInfo.cmake b/cmake/mode.RelWithDebInfo.cmake index a16c7e091d..6144be4b87 100644 --- a/cmake/mode.RelWithDebInfo.cmake +++ b/cmake/mode.RelWithDebInfo.cmake @@ -16,10 +16,11 @@ set(scylla_build_mode_RelWithDebInfo "release") add_compile_definitions( $<$:SCYLLA_BUILD_MODE=${scylla_build_mode_RelWithDebInfo}>) -set(clang_inline_threshold 2500) +set(Scylla_CLANG_INLINE_THRESHOLD "2500" CACHE STRING + "LLVM-specific inline threshold compilation parameter") add_compile_options( "$<$,$>:--param;inline-unit-growth=300>" - "$<$,$>:-mllvm;-inline-threshold=${clang_inline_threshold}>") + "$<$,$>:-mllvm;-inline-threshold=${Scylla_CLANG_INLINE_THRESHOLD}>") # clang generates 16-byte loads that break store-to-load forwarding # gcc also has some trouble: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103554 check_cxx_compiler_flag("-fno-slp-vectorize" _slp_vectorize_supported) diff --git a/configure.py b/configure.py index 444215bd1e..3c433bfb71 100755 --- a/configure.py +++ b/configure.py @@ -2542,6 +2542,8 @@ def configure_using_cmake(args): settings['Scylla_DATE_STAMP'] = args.date_stamp if args.staticboost: settings['Boost_USE_STATIC_LIBS'] = 'ON' + if args.clang_inline_threshold != -1: + settings['Scylla_CLANG_INLINE_THRESHOLD'] = args.clang_inline_threshold source_dir = os.path.realpath(os.path.dirname(__file__)) build_dir = os.path.join(source_dir, 'build')