summaryrefslogtreecommitdiff
path: root/libc/CMakeLists.txt
diff options
context:
space:
mode:
authorSiva Chandra Reddy <sivachandra@google.com>2023-01-06 08:21:49 +0000
committerSiva Chandra Reddy <sivachandra@google.com>2023-01-06 23:32:07 +0000
commit8304f6de94872cdcaba63039a61b8860fe367620 (patch)
tree704976d5398e8c1c849ca751e443552f2cd63ff5 /libc/CMakeLists.txt
parent493459b6dd28e4cb7414879a507f641b0414f3e4 (diff)
downloadllvm-8304f6de94872cdcaba63039a61b8860fe367620.tar.gz
[libc] Add a separate install target for the libc static archives.
Also, skip installing startup objects for baremetal targets for now. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D141112
Diffstat (limited to 'libc/CMakeLists.txt')
-rw-r--r--libc/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 8eb45838f954..7bf1c02e331f 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -163,7 +163,13 @@ set(LIBC_INSTALL_TARGET)
if(LLVM_LIBC_FULL_BUILD)
set(LIBC_TARGET libc)
set(LIBC_COMPONENT libc)
- set(LIBC_INSTALL_DEPENDS "libc;install-libc-headers;libc-startup")
+ set(LIBC_INSTALL_DEPENDS "install-libc-static-archives;install-libc-headers")
+ if(NOT LIBC_TARGET_OS_IS_BAREMETAL)
+ # For now we will disable libc-startup installation for baremetal. The
+ # correct way to do it would be to make a hookable startup for baremetal
+ # and install it as part of the libc installation.
+ list(APPEND LIBC_INSTALL_DEPENDS "libc-startup")
+ endif()
set(LIBC_INSTALL_TARGET install-libc)
if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
set(LIBC_ARCHIVE_NAME cgpu)
@@ -173,7 +179,7 @@ if(LLVM_LIBC_FULL_BUILD)
else()
set(LIBC_TARGET llvmlibc)
set(LIBC_COMPONENT llvmlibc)
- set(LIBC_INSTALL_DEPENDS llvmlibc)
+ set(LIBC_INSTALL_DEPENDS install-libc-static-archives)
set(LIBC_INSTALL_TARGET install-llvmlibc)
set(LIBC_ARCHIVE_NAME llvmlibc)
endif()