mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
enable debug symbols for CMAKE_BUILD_TYPE=Debug
This commit is contained in:
parent
237cf8c331
commit
c3697364fd
@ -60,12 +60,15 @@ endif()
|
||||
|
||||
SET(CMAKE_BUILD_COLOR_MAKEFILE ON)
|
||||
SET(CMAKE_CXX_FLAGS "-std=gnu++1y ${COMMON_WARNING_FLAGS} -Wnon-virtual-dtor ${MACHINE_FLAGS} ${GLIBC_COMPATIBILITY_COMPILE_FLAGS} ${CXX11_ABI}")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG ${CXX11_ABI}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g ${CXX11_ABI}")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -fomit-frame-pointer")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb3 -fno-inline -fno-omit-frame-pointer")
|
||||
|
||||
SET(CMAKE_C_FLAGS "${COMMON_WARNING_FLAGS} ${MACHINE_FLAGS} ${GLIBC_COMPATIBILITY_COMPILE_FLAGS} ${CXX11_ABI}")
|
||||
SET(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG ${CXX11_ABI}")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g ${CXX11_ABI}")
|
||||
SET(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG -fimot-frame-pointer")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -ggdb3 -fno-inline -fno-omit-frame-pointer")
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ ${GLIBC_COMPATIBILITY_LINK_FLAGS} ${CXX11_ABI}")
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_ASAN "-O3 -g -fsanitize=address -fno-omit-frame-pointer ${CXX11_ABI}")
|
||||
@ -73,9 +76,6 @@ SET(CMAKE_CXX_FLAGS_UBSAN "-O3 -g -fsanitize=undefined -fno-omit-f
|
||||
SET(CMAKE_C_FLAGS_ASAN "-O3 -g -fsanitize=address -fno-omit-frame-pointer ${CXX11_ABI}")
|
||||
SET(CMAKE_C_FLAGS_UBSAN "-O3 -g -fsanitize=undefined -fno-omit-frame-pointer ${CXX11_ABI}")
|
||||
|
||||
# cmake -DCMAKE_BUILD_TYPE=Debug ..
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g ${CXX11_ABI}")
|
||||
|
||||
# Флаги для test coverage
|
||||
SET(TEST_COVERAGE TRUE CACHE BOOL "Add compliler flags for test coverage")
|
||||
IF (TEST_COVERAGE)
|
||||
|
@ -918,40 +918,42 @@ add_library (dbms
|
||||
src/Client/MultiplexedConnections.cpp
|
||||
)
|
||||
|
||||
# Не генерируем отладочную информацию для файлов с большим количеством инстанцирований шаблонов
|
||||
# - для более быстрой линковки и меньшего размера бинарника.
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
src/Functions/FunctionsArithmetic.cpp
|
||||
src/Functions/FunctionsArray.cpp
|
||||
src/Functions/FunctionsCoding.cpp
|
||||
src/Functions/FunctionsComparison.cpp
|
||||
src/Functions/FunctionsConditional.cpp
|
||||
src/Functions/FunctionsConversion.cpp
|
||||
src/Functions/FunctionsDateTime.cpp
|
||||
src/Functions/FunctionsDictionaries.cpp
|
||||
src/Functions/FunctionsFormatting.cpp
|
||||
src/Functions/FunctionsHashing.cpp
|
||||
src/Functions/FunctionsHigherOrder.cpp
|
||||
src/Functions/FunctionsLogical.cpp
|
||||
src/Functions/FunctionsRandom.cpp
|
||||
src/Functions/FunctionsReinterpret.cpp
|
||||
src/Functions/FunctionsRound.cpp
|
||||
src/Functions/FunctionsString.cpp
|
||||
src/Functions/FunctionsStringArray.cpp
|
||||
src/Functions/FunctionsStringSearch.cpp
|
||||
src/Functions/FunctionsURL.cpp
|
||||
src/Functions/FunctionsVisitParam.cpp
|
||||
src/Functions/FunctionsMath.cpp
|
||||
src/Functions/FunctionsGeo.cpp
|
||||
src/Functions/FunctionsMiscellaneous.cpp
|
||||
src/Functions/FunctionsTransform.cpp
|
||||
src/Dictionaries/FlatDictionary.cpp
|
||||
src/Dictionaries/HashedDictionary.cpp
|
||||
src/Dictionaries/CacheDictionary.cpp
|
||||
src/Dictionaries/RangeHashedDictionary.cpp
|
||||
src/Dictionaries/ComplexKeyHashedDictionary.cpp
|
||||
src/Dictionaries/ComplexKeyCacheDictionary.cpp
|
||||
PROPERTIES COMPILE_FLAGS -g0)
|
||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
# Не генерируем отладочную информацию для файлов с большим количеством инстанцирований шаблонов
|
||||
# - для более быстрой линковки и меньшего размера бинарника.
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
src/Functions/FunctionsArithmetic.cpp
|
||||
src/Functions/FunctionsArray.cpp
|
||||
src/Functions/FunctionsCoding.cpp
|
||||
src/Functions/FunctionsComparison.cpp
|
||||
src/Functions/FunctionsConditional.cpp
|
||||
src/Functions/FunctionsConversion.cpp
|
||||
src/Functions/FunctionsDateTime.cpp
|
||||
src/Functions/FunctionsDictionaries.cpp
|
||||
src/Functions/FunctionsFormatting.cpp
|
||||
src/Functions/FunctionsHashing.cpp
|
||||
src/Functions/FunctionsHigherOrder.cpp
|
||||
src/Functions/FunctionsLogical.cpp
|
||||
src/Functions/FunctionsRandom.cpp
|
||||
src/Functions/FunctionsReinterpret.cpp
|
||||
src/Functions/FunctionsRound.cpp
|
||||
src/Functions/FunctionsString.cpp
|
||||
src/Functions/FunctionsStringArray.cpp
|
||||
src/Functions/FunctionsStringSearch.cpp
|
||||
src/Functions/FunctionsURL.cpp
|
||||
src/Functions/FunctionsVisitParam.cpp
|
||||
src/Functions/FunctionsMath.cpp
|
||||
src/Functions/FunctionsGeo.cpp
|
||||
src/Functions/FunctionsMiscellaneous.cpp
|
||||
src/Functions/FunctionsTransform.cpp
|
||||
src/Dictionaries/FlatDictionary.cpp
|
||||
src/Dictionaries/HashedDictionary.cpp
|
||||
src/Dictionaries/CacheDictionary.cpp
|
||||
src/Dictionaries/RangeHashedDictionary.cpp
|
||||
src/Dictionaries/ComplexKeyHashedDictionary.cpp
|
||||
src/Dictionaries/ComplexKeyCacheDictionary.cpp
|
||||
PROPERTIES COMPILE_FLAGS -g0)
|
||||
endif()
|
||||
|
||||
IF (NOT AARCH64)
|
||||
SET(LINK_LIBRARIES_ONLY_ON_X86_64 cpuid)
|
||||
|
Loading…
Reference in New Issue
Block a user