[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:06:26 PST 2026
================
@@ -71,10 +71,15 @@ function(get_arch_and_system_from_triple triple arch_var sys_var)
# Setting OS name for GPU architectures.
list(GET triple_comps -1 gpu_target_sys)
- if(gpu_target_sys MATCHES "^amdhsa" OR gpu_target_sys MATCHES "^cuda")
+ if(gpu_target_sys MATCHES "^amdhsa" OR gpu_target_sys MATCHES "^cuda" OR target_arch MATCHES "^spirv")
set(target_sys "gpu")
endif()
+ if (target_arch MATCHES "^spirv")
+ list(APPEND
+ LIBC_COMPILE_OPTIONS_DEFAULT "-emit-llvm")
----------------
jhuber6 wrote:
Is this necessary here? The other targets use `-flto` already except for tests, and I don't think this builds tests yet.
https://github.com/llvm/llvm-project/pull/181049
More information about the libc-commits
mailing list