[libc-commits] [clang] [libc] [llvm] [OFFLOAD] Add support to build libc for SPIRV backend (PR #181049)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Feb 16 14:20:37 PST 2026


================
@@ -109,8 +109,14 @@ function(add_bitcode_entrypoint_library target_name base_target_name)
   endforeach()
 
   add_executable(${target_name} ${objects})
-  target_link_options(${target_name} PRIVATE "${LIBC_COMPILE_OPTIONS_DEFAULT}"
+  if("${LLVM_DEFAULT_TARGET_TRIPLE}" MATCHES "^spirv" OR
+     "${CMAKE_CXX_COMPILER_TARGET}" MATCHES "^spirv")
----------------
jhuber6 wrote:

There should be a CMake variable to determine the architecture. Look at `LIBC_TARGET_ARCHITECTURE_IS_NVPTX` and others.

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


More information about the libc-commits mailing list