* transpose include(mode.common) and include (mode.${build_mode}),
so the former can reference the value defined by the latter.
* set stack_usage_threshold for supported build modes.
please note, this compiler option (-Wstack-usage=<bytes>) is only
supported by GCC so far.
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
24 lines
579 B
CMake
24 lines
579 B
CMake
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
|
# -fasan -Og breaks some coroutines on aarch64, use -O0 instead
|
|
set(default_Seastar_OptimizationLevel_DEBUG "0")
|
|
else()
|
|
set(default_Seastar_OptimizationLevel_DEBUG "g")
|
|
endif()
|
|
set(Seastar_OptimizationLevel_DEBUG
|
|
${default_Seastar_OptimizationLevel_DEBUG}
|
|
CACHE
|
|
INTERNAL
|
|
"")
|
|
|
|
set(Seastar_DEFINITIONS_DEBUG
|
|
SCYLLA_BUILD_MODE=debug
|
|
DEBUG
|
|
SANITIZE
|
|
DEBUG_LSA_SANITIZER
|
|
SCYLLA_ENABLE_ERROR_INJECTION)
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG
|
|
" -O${Seastar_OptimizationLevel_DEBUG} -g -gz")
|
|
|
|
set(stack_usage_threshold_in_KB 40)
|