[libc-commits] [PATCH] D129041: Use add_llvm_install_targets for install-llvmlibc

Jeff Bailey via Phabricator via libc-commits libc-commits at lists.llvm.org
Sat Jul 2 20:45:18 PDT 2022


jeffbailey created this revision.
Herald added subscribers: libc-commits, mgorny.
Herald added projects: libc-project, All.
jeffbailey requested review of this revision.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129041

Files:
  libc/lib/CMakeLists.txt


Index: libc/lib/CMakeLists.txt
===================================================================
--- libc/lib/CMakeLists.txt
+++ libc/lib/CMakeLists.txt
@@ -16,9 +16,8 @@
   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
 )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129041.441922.patch
Type: text/x-patch
Size: 480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220703/654fced1/attachment.bin>


More information about the libc-commits mailing list