aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Bailey <jeffbailey@google.com>2022-07-03 03:42:58 +0000
committerJeff Bailey <jeffbailey@google.com>2022-07-04 17:18:36 +0000
commitbc70ba814dc170a42a85972aba7ed116e244dff8 (patch)
treef29bc3005595538e1d06a05643171b78bb8ea316
parentc3839c0b46a902f96f9395ec15d89d0cb21c73b3 (diff)
downloadllvm-bc70ba814dc170a42a85972aba7ed116e244dff8.zip
llvm-bc70ba814dc170a42a85972aba7ed116e244dff8.tar.gz
llvm-bc70ba814dc170a42a85972aba7ed116e244dff8.tar.bz2
Use add_llvm_install_targets for install-llvmlibc
Using the LLVM rules for install ensures that DESTDIR and other expected variables for an LLVM install work correctly. Tested: Manually with DESTDIR=/tmp/testinstall/ ninja install-llvmlibc Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D129041
-rw-r--r--libc/lib/CMakeLists.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index c5d48e8..ed8e6f8 100644
--- a/libc/lib/CMakeLists.txt
+++ b/libc/lib/CMakeLists.txt
@@ -16,9 +16,8 @@ install(
COMPONENT llvmlibc
)
-add_custom_target(
- install-llvmlibc
- DEPENDS llvmlibc
- COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=llvmlibc
- -P "${LIBC_BINARY_DIR}/cmake_install.cmake"
+add_llvm_install_targets(
+ install-llvmlibc
+ DEPENDS llvmlibc
+ COMPONENT llvmlibc
)