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()