Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2020-04-25 01:00:46 +0300
committerJan Vorlicek <janvorli@microsoft.com>2020-04-25 01:00:46 +0300
commit3e87ca5f8d5c19c131f58d9e8037c41e147115c1 (patch)
tree8b1973ffd4900e3eccc786466241b66d6354cc53 /eng/native
parentbfa10f1956ee7785af159c9448d46e736cc7a932 (diff)
Fix OSX debug / checked build symbols
The strip command we invoke was stripping even the information that is necessary for the debugger to find the separate .dwarf files, so these symbol files had to be loaded manually into lldb. With this fix, lldb loads them automatically.
Diffstat (limited to 'eng/native')
-rw-r--r--eng/native/functions.cmake13
1 files changed, 10 insertions, 3 deletions
diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake
index b422fc7c7c8..060cff8987e 100644
--- a/eng/native/functions.cmake
+++ b/eng/native/functions.cmake
@@ -268,13 +268,20 @@ function(strip_symbols targetName outputFilename)
message(FATAL_ERROR "strip not found")
endif()
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" LOWERCASE_CMAKE_BUILD_TYPE)
+ if (LOWERCASE_CMAKE_BUILD_TYPE STREQUAL release)
+ set(strip_command ${STRIP} -S ${strip_source_file})
+ else ()
+ set(strip_command)
+ endif ()
+
add_custom_command(
TARGET ${targetName}
POST_BUILD
VERBATIM
COMMAND ${DSYMUTIL} --flat --minimize ${strip_source_file}
- COMMAND ${STRIP} -S ${strip_source_file}
- COMMENT Stripping symbols from ${strip_source_file} into file ${strip_destination_file}
+ COMMAND ${strip_command}
+ COMMENT "Stripping symbols from ${strip_source_file} into file ${strip_destination_file}"
)
else (CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(strip_destination_file ${strip_source_file}.dbg)
@@ -286,7 +293,7 @@ function(strip_symbols targetName outputFilename)
COMMAND ${CMAKE_OBJCOPY} --only-keep-debug ${strip_source_file} ${strip_destination_file}
COMMAND ${CMAKE_OBJCOPY} --strip-debug ${strip_source_file}
COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=${strip_destination_file} ${strip_source_file}
- COMMENT Stripping symbols from ${strip_source_file} into file ${strip_destination_file}
+ COMMENT "Stripping symbols from ${strip_source_file} into file ${strip_destination_file}"
)
endif (CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)