[compiler-rt] r265057 - [CMake] Provide the ability to skip stripping when generating dSYMs

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 14:17:19 PDT 2016


Author: cbieneman
Date: Thu Mar 31 16:17:19 2016
New Revision: 265057

URL: http://llvm.org/viewvc/llvm-project?rev=265057&view=rev
Log:
[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 COMPILER_RT_EXTERNALIZE_DEBUGINFO_SKIP_STRIP=On.

Modified:
    compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake

Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=265057&r1=265056&r2=265057&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Thu Mar 31 16:17:19 2016
@@ -362,6 +362,10 @@ function(rt_externalize_debuginfo name)
     return()
   endif()
 
+  if(NOT COMPILER_RT_EXTERNALIZE_DEBUGINFO_SKIP_STRIP)
+    set(strip_command COMMAND xcrun strip -Sl $<TARGET_FILE:${name}>)
+  endif()
+
   if(APPLE)
     if(CMAKE_CXX_FLAGS MATCHES "-flto"
       OR CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE} MATCHES "-flto")
@@ -372,7 +376,7 @@ function(rt_externalize_debuginfo name)
     endif()
     add_custom_command(TARGET ${name} POST_BUILD
       COMMAND xcrun dsymutil $<TARGET_FILE:${name}>
-      COMMAND xcrun strip -Sl $<TARGET_FILE:${name}>)
+      ${strip_command})
   else()
     message(FATAL_ERROR "COMPILER_RT_EXTERNALIZE_DEBUGINFO isn't implemented for non-darwin platforms!")
   endif()




More information about the llvm-commits mailing list