summaryrefslogtreecommitdiff
path: root/src/coreclr
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2016-03-15 16:04:06 -0700
committerMike McLaughlin <mikem@microsoft.com>2016-03-22 14:24:03 -0700
commit4efef62f0ead16b4f8ca2c6ccf0a77ce112f73b9 (patch)
tree97f19fefb5832f8e92f63b2cd7c09c43ac9b0904 /src/coreclr
parent1a9eb1c5f4d9f257f3f96ef5205a0eb1a23395c3 (diff)
downloadcoreclr-4efef62f0ead16b4f8ca2c6ccf0a77ce112f73b9.tar.gz
coreclr-4efef62f0ead16b4f8ca2c6ccf0a77ce112f73b9.tar.bz2
coreclr-4efef62f0ead16b4f8ca2c6ccf0a77ce112f73b9.zip
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).
Diffstat (limited to 'src/coreclr')
-rw-r--r--src/coreclr/hosts/coreconsole/CMakeLists.txt4
-rw-r--r--src/coreclr/hosts/corerun/CMakeLists.txt6
-rw-r--r--src/coreclr/hosts/osxbundlerun/CMakeLists.txt2
-rw-r--r--src/coreclr/hosts/unixcoreconsole/CMakeLists.txt2
-rw-r--r--src/coreclr/hosts/unixcorerun/CMakeLists.txt2
5 files changed, 5 insertions, 11 deletions
diff --git a/src/coreclr/hosts/coreconsole/CMakeLists.txt b/src/coreclr/hosts/coreconsole/CMakeLists.txt
index 8848ff7d1a..634fdb77d6 100644
--- a/src/coreclr/hosts/coreconsole/CMakeLists.txt
+++ b/src/coreclr/hosts/coreconsole/CMakeLists.txt
@@ -27,8 +27,6 @@ else()
)
# Can't compile on linux yet so only add for windows
- # add the install targets
- install (TARGETS CoreConsole DESTINATION .)
- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/$ENV{__BuildType}/CoreConsole.pdb DESTINATION PDB)
+ install_clr(CoreConsole)
endif(CLR_CMAKE_PLATFORM_UNIX) \ No newline at end of file
diff --git a/src/coreclr/hosts/corerun/CMakeLists.txt b/src/coreclr/hosts/corerun/CMakeLists.txt
index 3a992ebcf5..7b25c12d6b 100644
--- a/src/coreclr/hosts/corerun/CMakeLists.txt
+++ b/src/coreclr/hosts/corerun/CMakeLists.txt
@@ -32,10 +32,6 @@ else()
)
# Can't compile on linux yet so only add for windows
- # add the install targets
- install (TARGETS CoreRun DESTINATION .)
+ install_clr(CoreRun)
- # We will generate PDB only for the debug configuration
- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/CoreRun.pdb DESTINATION PDB)
-
endif(CLR_CMAKE_PLATFORM_UNIX) \ No newline at end of file
diff --git a/src/coreclr/hosts/osxbundlerun/CMakeLists.txt b/src/coreclr/hosts/osxbundlerun/CMakeLists.txt
index 9c8fd7a275..2ccc881dbe 100644
--- a/src/coreclr/hosts/osxbundlerun/CMakeLists.txt
+++ b/src/coreclr/hosts/osxbundlerun/CMakeLists.txt
@@ -21,4 +21,4 @@ add_dependencies(osxbundlerun
coreclr
)
-install (TARGETS osxbundlerun DESTINATION .)
+install_clr(osxbundlerun)
diff --git a/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt b/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt
index f4840edf38..cb18e82776 100644
--- a/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt
+++ b/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt
@@ -30,4 +30,4 @@ add_dependencies(coreconsole
coreclr
)
-install (TARGETS coreconsole DESTINATION .)
+install_clr(coreconsole) \ No newline at end of file
diff --git a/src/coreclr/hosts/unixcorerun/CMakeLists.txt b/src/coreclr/hosts/unixcorerun/CMakeLists.txt
index 4563ba9938..1f0c75995e 100644
--- a/src/coreclr/hosts/unixcorerun/CMakeLists.txt
+++ b/src/coreclr/hosts/unixcorerun/CMakeLists.txt
@@ -30,4 +30,4 @@ add_dependencies(corerun
coreclr
)
-install (TARGETS corerun DESTINATION .)
+install_clr(corerun) \ No newline at end of file