summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2017-12-06 21:03:42 +0000
committerShoaib Meenai <smeenai@fb.com>2017-12-06 21:03:42 +0000
commitf7c7944387332b40033b58bab798ff6450aa7692 (patch)
tree47fc1c6a404538ec1bf7f1340002e21806a8cace
parentd98dbeeb71b7fc37f68e0317142cb1f7f05b5f38 (diff)
downloadbcm5719-llvm-f7c7944387332b40033b58bab798ff6450aa7692.tar.gz
bcm5719-llvm-f7c7944387332b40033b58bab798ff6450aa7692.zip
[libc++] Create install-stripped targets
LLVM is gaining install-*-stripped targets to perform stripped installs, and in order for this to be useful for install-distribution, all potential distribution components should have stripped installation targets. LLVM has a function to create these install targets, but since we can't use LLVM CMake functions in libc++, let's do it manually. Differential Revision: https://reviews.llvm.org/D40680 llvm-svn: 319959
-rw-r--r--libcxx/include/CMakeLists.txt2
-rw-r--r--libcxx/lib/CMakeLists.txt8
2 files changed, 10 insertions, 0 deletions
diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 5a1b2ccdc42..6b1383fd636 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -58,6 +58,8 @@ if (LIBCXX_INSTALL_HEADERS)
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=cxx-headers
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ # Stripping is a no-op for headers
+ add_custom_target(install-cxx-headers-stripped DEPENDS install-cxx-headers)
add_custom_target(libcxx-headers)
add_custom_target(install-libcxx-headers DEPENDS install-cxx-headers)
diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt
index 6f574cc03a6..aa5ebf1568e 100644
--- a/libcxx/lib/CMakeLists.txt
+++ b/libcxx/lib/CMakeLists.txt
@@ -389,5 +389,13 @@ if (NOT CMAKE_CONFIGURATION_TYPES AND (LIBCXX_INSTALL_LIBRARY OR
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=cxx
-P "${LIBCXX_BINARY_DIR}/cmake_install.cmake")
+ add_custom_target(install-cxx-stripped
+ DEPENDS ${lib_install_target}
+ ${experimental_lib_install_target}
+ ${header_install_target}
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=cxx
+ -DCMAKE_INSTALL_DO_STRIP=1
+ -P "${LIBCXX_BINARY_DIR}/cmake_install.cmake")
add_custom_target(install-libcxx DEPENDS install-cxx)
endif()
OpenPOWER on IntegriCloud