in this change,
* all `Seastar_OptimizationLevel_*` are dropped.
* mode.Sanitize.cmake:
s/CMAKE_CXX_FLAGS_COVERAGE/CMAKE_CXX_FLAGS_SANITIZE/
* mode.Dev.cmake:
s/CMAKE_CXX_FLAGS_RELEASE/CMAKE_CXX_FLAGS_DEV/
Seastar_OptimizationLevel_* variables have nothing to do with
Seastar, and they introduce unnecessary indirection. the function
of `update_cxx_flags()` already requires an option name for this
parameter, so there is no need to have a name for it.
the cached entry of `Seastar_OptimizationLevel_DEBUG` is also
dropped, if we really need to have knobs which can be configured
by user, we should define them in a more formal way. at this
moment, this is not necessary. so drop it along with this
variable.
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
Closes scylladb/scylladb#16059
24 lines
584 B
CMake
24 lines
584 B
CMake
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
|
# -fasan -Og breaks some coroutines on aarch64, use -O0 instead
|
|
set(OptimizationLevel "0")
|
|
else()
|
|
set(OptimizationLevel "g")
|
|
endif()
|
|
|
|
update_cxx_flags(CMAKE_CXX_FLAGS_DEBUG
|
|
WITH_DEBUG_INFO
|
|
OPTIMIZATION_LEVEL ${OptimizationLevel})
|
|
|
|
set(Seastar_DEFINITIONS_DEBUG
|
|
SCYLLA_BUILD_MODE=debug
|
|
DEBUG
|
|
SANITIZE
|
|
DEBUG_LSA_SANITIZER
|
|
SCYLLA_ENABLE_ERROR_INJECTION)
|
|
foreach(definition ${Seastar_DEFINITIONS_DEBUG})
|
|
add_compile_definitions(
|
|
$<$<CONFIG:Debug>:${definition}>)
|
|
endforeach()
|
|
|
|
maybe_limit_stack_usage_in_KB(40 Debug)
|