From 22b64a446c8c37cc0b3670eb117b64575fc54d2f Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Fri, 6 Dec 2024 15:55:48 +0800 Subject: Split debug info for all targets (#5732) * Split debug info for all targets Work towards https://github.com/shader-slang/slang/issues/5724 * release separate debug info Closes https://github.com/shader-slang/slang/issues/5724 * Add split debug info support for MacOS * Add SLANG_ENABLE_SPLIT_DEBUG_INFO option * Sign and package debug info on MacOS * Set --build-id where available * Correct debug info installing * Keep cpack macos signing workaround * Neaten cmake * Disable sccache if building split debug info on Windows * Only repack necessary files on MacOS releases --- cmake/CompilerFlags.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cmake/CompilerFlags.cmake') diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake index cd9021cd0..e3ddaa7e0 100644 --- a/cmake/CompilerFlags.cmake +++ b/cmake/CompilerFlags.cmake @@ -152,8 +152,14 @@ function(set_default_compile_options target) add_supported_cxx_flags(${target} PRIVATE ${warning_flags}) - # Don't assume that symbols will be resolved at runtime - add_supported_cxx_linker_flags(${target} PRIVATE "-Wl,--no-undefined") + add_supported_cxx_linker_flags( + ${target} + PRIVATE + # Don't assume that symbols will be resolved at runtime + "-Wl,--no-undefined" + # No reason not to do this? Useful when using split debug info + "-Wl,--build-id" + ) set_target_properties( ${target} -- cgit v1.2.3