diff options
author | Shoaib Meenai <smeenai@fb.com> | 2017-11-30 21:48:26 +0000 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2017-11-30 21:48:26 +0000 |
commit | dbd3af20e6f0b80146ec7085592c792ba2f27fa2 (patch) | |
tree | 61c009deef53fcd5a7b1fee4be1bf0d53607ebf8 /CMakeLists.txt | |
parent | c76543620ef411c5c78bc206131426323fa12184 (diff) |
[llvm] Add stripped installation targets
CMake's generated installation scripts support `CMAKE_INSTALL_DO_STRIP`
to enable stripping the installed binaries. LLVM's build system doesn't
expose this option to the `install-` targets, but it's useful in
conjunction with `install-distribution`.
Add a new function to create the install targets, which creates both the
regular install target and a second install target that strips during
installation. Change the creation of all installation targets to use
this new function. Stripping doesn't make a whole lot of sense for some
installation targets (e.g. the LLVM headers), but consistency doesn't
hurt.
I'll make other repositories (e.g. clang, compiler-rt) use this in a
follow-up, and then add an `install-distribution-stripped` target to
actually accomplish the end goal of creating a stripped distribution. I
don't want to do that step yet because the creation of that target would
depend on the presence of the `install-*-stripped` target for each
distribution component, and the distribution components from other
repositories will be missing that target right now.
Differential Revision: https://reviews.llvm.org/D40620
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cd9d053c63..46d5282d8a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -975,11 +975,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) set_target_properties(llvm-headers PROPERTIES FOLDER "Misc") if (NOT CMAKE_CONFIGURATION_TYPES) - add_custom_target(install-llvm-headers - DEPENDS llvm-headers - COMMAND "${CMAKE_COMMAND}" - -DCMAKE_INSTALL_COMPONENT=llvm-headers - -P "${CMAKE_BINARY_DIR}/cmake_install.cmake") + add_llvm_install_targets(install-llvm-headers + COMPONENT llvm-headers) endif() endif() |