For debugging it is useful to be able to generate dSYM files but not strip the executables. This change adds the ability to skip stripping by setting LLVM_EXTERNALIZE_DEBUGINFO_SKIP_STRIP=On.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265041
91177308-0d34-0410-b5e6-
96231b3b80d8
return()
endif()
+ if(NOT LLVM_EXTERNALIZE_DEBUGINFO_SKIP_STRIP)
+ set(strip_command COMMAND xcrun strip -Sxl $<TARGET_FILE:${name}>)
+ endif()
+
if(APPLE)
if(CMAKE_CXX_FLAGS MATCHES "-flto"
OR CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE} MATCHES "-flto")
endif()
add_custom_command(TARGET ${name} POST_BUILD
COMMAND xcrun dsymutil $<TARGET_FILE:${name}>
- COMMAND xcrun strip -Sxl $<TARGET_FILE:${name}>)
+ ${strip_command}
+ )
else()
message(FATAL_ERROR "LLVM_EXTERNALIZE_DEBUGINFO isn't implemented for non-darwin platforms!")
endif()