[PATCH] D46611: [CMake] Use CMAKE_OBJCOPY and CMAKE_STRIP to externalize debug info
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 8 17:14:16 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL331827: [CMake] Use CMAKE_OBJCOPY and CMAKE_STRIP to externalize debug info (authored by phosek, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46611?vs=145813&id=145819#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46611
Files:
llvm/trunk/cmake/modules/AddLLVM.cmake
Index: llvm/trunk/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake
+++ llvm/trunk/cmake/modules/AddLLVM.cmake
@@ -1546,7 +1546,7 @@
if(APPLE)
set(strip_command COMMAND xcrun strip -Sxl $<TARGET_FILE:${name}>)
else()
- set(strip_command COMMAND strip -gx $<TARGET_FILE:${name}>)
+ set(strip_command COMMAND ${CMAKE_STRIP} -gx $<TARGET_FILE:${name}>)
endif()
endif()
@@ -1564,9 +1564,9 @@
)
else()
add_custom_command(TARGET ${name} POST_BUILD
- COMMAND objcopy --only-keep-debug $<TARGET_FILE:${name}> $<TARGET_FILE:${name}>.debug
+ COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $<TARGET_FILE:${name}> $<TARGET_FILE:${name}>.debug
${strip_command} -R .gnu_debuglink
- COMMAND objcopy --add-gnu-debuglink=$<TARGET_FILE:${name}>.debug $<TARGET_FILE:${name}>
+ COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE:${name}>.debug $<TARGET_FILE:${name}>
)
endif()
endfunction()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46611.145819.patch
Type: text/x-patch
Size: 1054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180509/61542304/attachment.bin>
More information about the llvm-commits
mailing list