mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-27 23:13:27 +00:00
[CMake] Use CMAKE_OBJCOPY and CMAKE_STRIP to externalize debug info
Don't hardcode objcopy and strip names, rather use CMAKE_OBJCOPY and CMAKE_STRIP variables which allows users to override the tools used such as using llvm-objcopy and llvm-strip instead of binutils versions. Differential Revision: https://reviews.llvm.org/D46611 llvm-svn: 331827
This commit is contained in:
parent
4a032a1bee
commit
a12eb6a357
@ -1546,7 +1546,7 @@ function(llvm_externalize_debuginfo name)
|
||||
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 @@ function(llvm_externalize_debuginfo name)
|
||||
)
|
||||
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user