[libc-commits] [libc] bc70ba8 - Use add_llvm_install_targets for install-llvmlibc
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Mon Jul 4 10:18:40 PDT 2022
Author: Jeff Bailey
Date: 2022-07-04T17:18:36Z
New Revision: bc70ba814dc170a42a85972aba7ed116e244dff8
URL: https://github.com/llvm/llvm-project/commit/bc70ba814dc170a42a85972aba7ed116e244dff8
DIFF: https://github.com/llvm/llvm-project/commit/bc70ba814dc170a42a85972aba7ed116e244dff8.diff
LOG: 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
Added:
Modified:
libc/lib/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index c5d48e8480f77..ed8e6f8f8edd0 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
)
More information about the libc-commits
mailing list