Skip to content

Commit

Permalink
Strip local symbols when using externalized debug info.
Browse files Browse the repository at this point in the history
When we build LLVM with externalized debug info, all debugging and
symbolication related data is extracted into dSYM files prior to
stripping. As such, there is no need to preserve local symbols in LLVM
binaries after dSYM creation.

This shrinks libLLVM.dylib from 58MB to 55MB on my system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258566 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
resistor committed Jan 22, 2016
1 parent a9e5370 commit cf2a93b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ function(llvm_externalize_debuginfo name)
endif()
add_custom_command(TARGET ${name} POST_BUILD
COMMAND xcrun dsymutil $<TARGET_FILE:${name}>
COMMAND xcrun strip -Sl $<TARGET_FILE:${name}>)
COMMAND xcrun strip -Sxl $<TARGET_FILE:${name}>)
else()
message(FATAL_ERROR "LLVM_EXTERNALIZE_DEBUGINFO isn't implemented for non-darwin platforms!")
endif()
Expand Down

0 comments on commit cf2a93b

Please sign in to comment.