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

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

<details>
<summary>Changes</summary>

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


---
Full diff: https://github.com/llvm/llvm-project/pull/129945.diff


1 Files Affected:

- (modified) libc/startup/gpu/CMakeLists.txt (+3) 


``````````diff
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(

``````````

</details>


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


More information about the libc-commits mailing list