Strip symbols on release builds into separate binaries
authorMike McLaughlin <mikem@microsoft.com>
Tue, 15 Mar 2016 23:04:06 +0000 (16:04 -0700)
committerMike McLaughlin <mikem@microsoft.com>
Tue, 22 Mar 2016 21:24:03 +0000 (14:24 -0700)
commit4efef62f0ead16b4f8ca2c6ccf0a77ce112f73b9
tree97f19fefb5832f8e92f63b2cd7c09c43ac9b0904
parent1a9eb1c5f4d9f257f3f96ef5205a0eb1a23395c3
Strip symbols on release builds into separate binaries

Issue #3669

Created a common cmake strip_symbols function that all the modules and programs
use to strip the symbols out of the main into a separate .dbg (Linux) or .dSYM (OSX)
file.

Added an install_clr cmake function to encapsulate the install logic.

Changed all the library module cmake install lines from a TARGETS to a FILES one. The
TARGETS based install directives caused cmake to relink the binary and copy the unstripped
version to the install path. Left the all programs like corerun or ildasm as TARGETS
installs because on OSX FILES type installs don't get marked as executable.

Need to use "get_property(strip_source_file TARGET ${targetName} PROPERTY LOCATION)" for
the older versions of cmake and "set(strip_source_file $<TARGET_FILE:${targetName}>)" on
newer versions (v3 or greater).
19 files changed:
CMakeLists.txt
src/ToolBox/SOS/Strike/CMakeLists.txt
src/ToolBox/SOS/lldbplugin/CMakeLists.txt
src/coreclr/hosts/coreconsole/CMakeLists.txt
src/coreclr/hosts/corerun/CMakeLists.txt
src/coreclr/hosts/osxbundlerun/CMakeLists.txt
src/coreclr/hosts/unixcoreconsole/CMakeLists.txt
src/coreclr/hosts/unixcorerun/CMakeLists.txt
src/corefx/System.Globalization.Native/CMakeLists.txt
src/dlls/clretwrc/CMakeLists.txt
src/dlls/dbgshim/CMakeLists.txt
src/dlls/mscordac/CMakeLists.txt
src/dlls/mscordbi/CMakeLists.txt
src/dlls/mscoree/coreclr/CMakeLists.txt
src/ilasm/CMakeLists.txt
src/ildasm/exe/CMakeLists.txt
src/jit/standalone/CMakeLists.txt
src/scripts/genXplatLttng.py
src/tools/crossgen/CMakeLists.txt