forked from OSchip/llvm-project
[libc] Install startup files with the install-libc target.
Differential Revision: https://reviews.llvm.org/D132212
This commit is contained in:
parent
8a002ab99e
commit
4d97766316
|
@ -148,7 +148,7 @@ set(LIBC_INSTALL_TARGET)
|
|||
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()
|
||||
|
|
|
@ -83,3 +83,14 @@ add_loader_object(
|
|||
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()
|
||||
|
|
Loading…
Reference in New Issue