[libc] Initial support for parsing SPIR-V for GPU libc (#128570)
Summary:
Some day we'd like to support this, add some initial support for parsing
the triple so it will at least attempt to build.
diff --git a/libc/cmake/modules/LLVMLibCArchitectures.cmake b/libc/cmake/modules/LLVMLibCArchitectures.cmake
index fbb1091..b94534b 100644
--- a/libc/cmake/modules/LLVMLibCArchitectures.cmake
+++ b/libc/cmake/modules/LLVMLibCArchitectures.cmake
@@ -53,6 +53,8 @@
set(target_arch "amdgpu")
elseif(target_arch MATCHES "^nvptx64")
set(target_arch "nvptx")
+ elseif(target_arch MATCHES "^spirv64")
+ set(target_arch "spirv64")
else()
return()
endif()
@@ -162,6 +164,8 @@
set(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU TRUE)
elseif(LIBC_TARGET_ARCHITECTURE STREQUAL "nvptx")
set(LIBC_TARGET_ARCHITECTURE_IS_NVPTX TRUE)
+elseif(LIBC_TARGET_ARCHITECTURE STREQUAL "spirv64")
+ set(LIBC_TARGET_ARCHITECTURE_IS_SPIRV TRUE)
else()
message(FATAL_ERROR
"Unsupported libc target architecture ${LIBC_TARGET_ARCHITECTURE}")