[libc-commits] [PATCH] D132212: [libc] Install startup files with the install-libc target.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Aug 19 01:17:32 PDT 2022
sivachandra created this revision.
sivachandra added a reviewer: jeffbailey.
Herald added subscribers: libc-commits, ecnelises, tschuett, mgorny.
Herald added projects: libc-project, All.
sivachandra requested review of this revision.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132212
Files:
libc/CMakeLists.txt
libc/loader/linux/CMakeLists.txt
Index: libc/loader/linux/CMakeLists.txt
===================================================================
--- libc/loader/linux/CMakeLists.txt
+++ libc/loader/linux/CMakeLists.txt
@@ -83,3 +83,14 @@
SRC
crtn.cpp
)
+
+add_custom_target(libc-startup)
+set(startup_components crt1 crti crtn)
+foreach(target IN LISTS startup_components)
+ set(fq_target_name libc.loader.linux.${target})
+ add_dependencies(libc-startup ${fq_target_name})
+ get_target_property(loader_object ${fq_target_name} LOADER_OBJECT)
+ install(FILES ${loader_object}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ COMPONENT ${LIBC_COMPONENT})
+endforeach()
Index: libc/CMakeLists.txt
===================================================================
--- libc/CMakeLists.txt
+++ libc/CMakeLists.txt
@@ -148,7 +148,7 @@
if(LLVM_LIBC_FULL_BUILD)
set(LIBC_TARGET libc)
set(LIBC_COMPONENT libc)
- set(LIBC_INSTALL_DEPENDS "libc;libc-headers")
+ set(LIBC_INSTALL_DEPENDS "libc;libc-headers;libc-startup")
set(LIBC_INSTALL_TARGET install-libc)
set(LIBC_ARCHIVE_NAME c)
else()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132212.453915.patch
Type: text/x-patch
Size: 1083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220819/43390544/attachment-0001.bin>
More information about the libc-commits
mailing list