[PATCH] D40689: [llvm] Add install-distribution-stripped
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 30 15:47:36 PST 2017
smeenai created this revision.
Herald added a subscriber: mgorny.
This is identical to the install-distribution target, except that it
strips the installed binaries.
I went and added the corresponding install-*-stripped targets for all
the projects I could think of (LLVM, clang, LLD, compiler-rt, libc++,
libc++abi, and libunwind). However, I'm sure I've missed something, and
I don't want to break existing users of LLVM_DISTRIBUTION_COMPONENTS, so
I'm initially introducing this target behind a configuration option. My
plan is to announce the change on llvm-dev and ask people to try it out
and report any missing install-*-stripped targets they run into, so that
they can get fixed. I'll then remove the option after a month or so,
once I'm reasonably confident no one will get broken.
https://reviews.llvm.org/D40689
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -349,6 +349,10 @@
set(LLVM_TARGET_ARCH "host"
CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic detection.")
+option(LLVM_ENABLE_INSTALL_DISTRIBUTION_STRIPPED
+ "Enable the install-distribution-stripped target, to install a stripped distribution."
+ OFF)
+
option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON)
set(LLVM_ENABLE_LIBXML2 "ON" CACHE STRING "Use libxml2 if available. Can be ON, OFF, or FORCE_ON")
@@ -989,6 +993,9 @@
add_custom_target(distribution)
add_custom_target(install-distribution)
+ if(LLVM_ENABLE_INSTALL_DISTRIBUTION_STRIPPED)
+ add_custom_target(install-distribution-stripped)
+ endif()
foreach(target ${LLVM_DISTRIBUTION_COMPONENTS})
if(TARGET ${target})
add_dependencies(distribution ${target})
@@ -1001,6 +1008,16 @@
else()
message(SEND_ERROR "Specified distribution component '${target}' doesn't have an install target")
endif()
+
+ if(LLVM_ENABLE_INSTALL_DISTRIBUTION_STRIPPED)
+ if(TARGET install-${target}-stripped)
+ add_dependencies(install-distribution-stripped install-${target}-stripped)
+ else()
+ message(SEND_ERROR "Specified distribution component '${target}' doesn't have an install-stripped target."
+ " Its installation target creation should be changed to use add_llvm_install_targets,"
+ " or you should manually create the 'install-${target}-stripped' target.")
+ endif()
+ endif()
endforeach()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40689.125046.patch
Type: text/x-patch
Size: 1681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171130/383c0964/attachment.bin>
More information about the llvm-commits
mailing list