[libc-commits] [libc] [libc] Allow building the GPU targets that don't have CRT (PR #129945)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Wed Mar 5 14:05:23 PST 2025


https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/129945

Summary:
If there's no subdirectory we can't make an alias. This allows it to at
least continue.


>From adbc4825ce0fb3b897ca175fad57fb57967096be Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Wed, 5 Mar 2025 16:04:16 -0600
Subject: [PATCH] [libc] Allow building the GPU targets that don't have CRT

Summary:
If there's no subdirectory we can't make an alias. This allows it to at
least continue.
---
 libc/startup/gpu/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libc/startup/gpu/CMakeLists.txt b/libc/startup/gpu/CMakeLists.txt
index 9d0e0885dff93..fa326ef46a9d1 100644
--- a/libc/startup/gpu/CMakeLists.txt
+++ b/libc/startup/gpu/CMakeLists.txt
@@ -40,6 +40,9 @@ endfunction()
 
 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
   add_subdirectory(${LIBC_TARGET_ARCHITECTURE})
+else()
+  message(WARNING "Cannot build 'crt1.o' for ${LIBC_TARGET_ARCHITECTURE} yet.")
+  return()
 endif()
 
 add_startup_object(



More information about the libc-commits mailing list