Skip to content

Commit 9bd7945

Browse files
authored
cmake: don`t split debug symbols off of static libs (#140)
Defaulting to `off` is more convenient for local debugging. Also disable splitting ELF debug symbols on static library archives
1 parent 7e7ae71 commit 9bd7945

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ option(SILKIT_ENABLE_UBSAN "Enable -f sanitize=undefined for builds (requires gc
3838
option(SILKIT_ENABLE_THREADSAN "Enable -f sanitize=thread for builds (requires gcc, clang)" OFF)
3939
option(SILKIT_ENABLE_COVERAGE "Enable coverage for builds (requires gcc, clang)" OFF)
4040
option(SILKIT_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)
41-
option(SILKIT_PACKAGE_SYMBOLS "Add a post-build step to create PDB/Symbol archives" ON)
41+
option(SILKIT_PACKAGE_SYMBOLS "Add a post-build step to create PDB/Symbol archives" OFF)
4242
option(SILKIT_BUILD_DASHBOARD "Build the SIL Kit Dashboard client." ON)
4343
option(SILKIT_ENABLE_TRACING_INSTRUMENTATION "Enable tracing instrumentation (_SILKIT_TRACE_CLASS_NAMES)." OFF)
4444
option(SILKIT_LINK_LLD "Use the lld linker for SIL KIT" OFF)

SilKit/cmake/SilKitBuildTools.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ macro(silkit_split_debugsymbols targetName)
1717
)
1818
endmacro()
1919

20-
2120
macro(silkit_package_debugsymbols targetName)
2221
if(MSVC)
2322
message(STATUS "Creating symbol package ${SILKIT_SYMBOLS_DIR_NAME}")
@@ -33,6 +32,11 @@ macro(silkit_package_debugsymbols targetName)
3332
return()
3433
endif()
3534
if(UNIX AND CMAKE_BUILD_TYPE MATCHES "Debug")
35+
get_target_property(targetType ${targetName} TYPE)
36+
if(targetType STREQUAL STATIC_LIBRARY)
37+
message(STATUS "SIL Kit: splitting debug symbols on static libraries is not supported")
38+
return()
39+
endif()
3640

3741
silkit_split_debugsymbols("${targetName}")
3842

0 commit comments

Comments
 (0)