summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-03-31 20:03:19 +0000
committerChris Bieneman <beanz@apple.com>2016-03-31 20:03:19 +0000
commit6099a4e7d4d190725add90fd471934480b00da5e (patch)
tree2e2d9d0d05e550a228061e902fc623cbc2c704f0 /llvm/cmake/modules
parent569efd2cfd28a8d9c68fe15f3b7dd6bfa8217aa2 (diff)
downloadbcm5719-llvm-6099a4e7d4d190725add90fd471934480b00da5e.tar.gz
bcm5719-llvm-6099a4e7d4d190725add90fd471934480b00da5e.zip
[CMake] Provide the ability to skip stripping when generating dSYMs
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. llvm-svn: 265041
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 1fd0c14396e..294e39b77a8 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1185,6 +1185,10 @@ function(llvm_externalize_debuginfo name)
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")
@@ -1195,7 +1199,8 @@ function(llvm_externalize_debuginfo name)
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()
OpenPOWER on IntegriCloud