[libc-commits] [libc] Skip startup target for SPIRV target in libc install dependencies (PR #198740)
via libc-commits
libc-commits at lists.llvm.org
Wed May 20 02:57:47 PDT 2026
https://github.com/jinge90 created https://github.com/llvm/llvm-project/pull/198740
We skip startup target for SPIRV build in https://github.com/llvm/llvm-project/pull/197381 but missed removing it from "install-libc" target dependencies, this will lead to cmake configure error when trying to install libc for SPIRV target, the error message is:
ninja: error: 'libc/lib/libc-startup', needed by 'libc/lib/CMakeFiles/install-libc', missing and no known rule to make it
We need to add startup target back when it is supported by SPIRV target.
>From d62c70010fafb16a889367168044ec48430bae19 Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Wed, 20 May 2026 17:50:17 +0800
Subject: [PATCH] Skip startup target for SPIRV target in libc install
dependencies
Signed-off-by: jinge90 <ge.jin at intel.com>
---
libc/lib/CMakeLists.txt | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index 08026e937be94..c6b7aa4a47eb1 100644
--- a/libc/lib/CMakeLists.txt
+++ b/libc/lib/CMakeLists.txt
@@ -83,19 +83,21 @@ if(LLVM_LIBC_FULL_BUILD)
set(header_install_target install-libc-headers)
endif()
+set(install-libc-depends ${added_archive_targets}
+ ${added_bitcode_targets}
+ ${header_install_target})
+# TODO: Add startup_target to install-libc depend list when SPIRV64
+# supports it.
+if (NOT LIBC_TARGET_ARCHITECTURE_IS_SPIRV)
+ list(APPEND install-libc-depends ${startup_target})
+endif()
add_custom_target(install-libc
- DEPENDS ${added_archive_targets}
- ${added_bitcode_targets}
- ${startup_target}
- ${header_install_target}
+ DEPENDS ${install-libc-depends}
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=libc
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
add_custom_target(install-libc-stripped
- DEPENDS ${added_archive_targets}
- ${added_bitcode_targets}
- ${startup_target}
- ${header_install_target}
+ DEPENDS ${install-libc-depends}
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=libc
-DCMAKE_INSTALL_DO_STRIP=1
More information about the libc-commits
mailing list