[libcxx] r319959 - [libc++] Create install-stripped targets
Shoaib Meenai via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 6 13:03:42 PST 2017
Author: smeenai
Date: Wed Dec 6 13:03:42 2017
New Revision: 319959
URL: http://llvm.org/viewvc/llvm-project?rev=319959&view=rev
Log:
[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
Modified:
libcxx/trunk/include/CMakeLists.txt
libcxx/trunk/lib/CMakeLists.txt
Modified: libcxx/trunk/include/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/CMakeLists.txt?rev=319959&r1=319958&r2=319959&view=diff
==============================================================================
--- libcxx/trunk/include/CMakeLists.txt (original)
+++ libcxx/trunk/include/CMakeLists.txt Wed Dec 6 13:03:42 2017
@@ -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)
Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=319959&r1=319958&r2=319959&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Wed Dec 6 13:03:42 2017
@@ -389,5 +389,13 @@ if (NOT CMAKE_CONFIGURATION_TYPES AND (L
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()
More information about the cfe-commits
mailing list