[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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319959 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 6f574cc..aa5ebf1 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -389,5 +389,13 @@
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()