Skip to content

Commit

Permalink
Fix stripping debug info from huge .o (-g0)
Browse files Browse the repository at this point in the history
  • Loading branch information
proller committed Oct 24, 2017
1 parent d5cf664 commit 2d2a4af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 26 deletions.
2 changes: 1 addition & 1 deletion contrib/librdkafka
34 changes: 9 additions & 25 deletions dbms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,40 +116,24 @@ else ()
endif ()


if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG")
# Won't generate debug info for files with heavy template instantiation to achieve faster linking and lower size.
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/TrieDictionary.cpp
src/Dictionaries/RangeHashedDictionary.cpp
src/Dictionaries/ComplexKeyHashedDictionary.cpp
src/Dictionaries/ComplexKeyCacheDictionary.cpp
src/Dictionaries/ComplexKeyCacheDictionary_generate1.cpp
src/Dictionaries/ComplexKeyCacheDictionary_generate2.cpp
src/Dictionaries/ComplexKeyCacheDictionary_generate3.cpp
src/Dictionaries/ODBCBlockInputStream.cpp
src/Dictionaries/HTTPDictionarySource.cpp
src/Dictionaries/LibraryDictionarySource.cpp
src/Dictionaries/ExecutableDictionarySource.cpp
src/Dictionaries/ClickHouseDictionarySource.cpp
PROPERTIES COMPILE_FLAGS -g0)
endif ()

Expand Down
5 changes: 5 additions & 0 deletions dbms/src/Functions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ target_include_directories (clickhouse_functions BEFORE PUBLIC ${ClickHouse_SOUR
target_include_directories (clickhouse_functions BEFORE PUBLIC ${ClickHouse_SOURCE_DIR}/contrib/libmetrohash/src)
target_include_directories (clickhouse_functions BEFORE PUBLIC ${DIVIDE_INCLUDE_DIR})

if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG")
# Won't generate debug info for files with heavy template instantiation to achieve faster linking and lower size.
target_compile_options(clickhouse_functions PRIVATE "-g0")
endif ()

if (USE_VECTORCLASS)
target_include_directories (clickhouse_functions BEFORE PUBLIC ${VECTORCLASS_INCLUDE_DIR})
endif ()
Expand Down

0 comments on commit 2d2a4af

Please sign in to comment.