https://github.com/wenju-he created 
https://github.com/llvm/llvm-project/pull/199618

spirv*-mesa-mesa3d are legal clang targets since 3c6fe49a912a.

spirv-diff shows only numbering change to spirv64-mesa-mesa3d/libclc.spv. 
llvm-diff shows no change on reverse-translated bitcode files.

Also fixes a bug that spirv32-mesa-mesa3d was incorrectly using 64-bit triple 
spir64--.

Update README.md to use spirv32-mesa-mesa3d instead of logical SPIR-V.

>From d7d490ce095e330a7660e1288e85572b810c4d43 Mon Sep 17 00:00:00 2001
From: Wenju He <[email protected]>
Date: Tue, 26 May 2026 08:22:09 +0200
Subject: [PATCH] [libclc] Use native spirv*-mesa-mesa3d clang triple for mesa

spirv*-mesa-mesa3d are legal clang targets since 3c6fe49a912a.

spirv-diff shows only numbering change to spirv64-mesa-mesa3d/libclc.spv.
llvm-diff shows no change on reverse-translated bitcode files.

Also fixes a bug that spirv32-mesa-mesa3d was incorrectly using 64-bit
triple spir64--.

Update README.md to use spirv32-mesa-mesa3d instead of logical SPIR-V.
---
 libclc/CMakeLists.txt | 12 +-----------
 libclc/README.md      |  4 ++--
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 44d9f7a281b5d..94ec63c89ff0a 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -123,18 +123,8 @@ foreach( tool IN ITEMS opt llvm-link )
   endif()
 endforeach()
 
-# Determine the clang target triple. Vulkan and SPIR-V backend targets use the
-# triple directly; other SPIR-V targets fall back to the legacy SPIR target.
+# Determine the clang target triple.
 set(clang_triple ${LIBCLC_TARGET})
-if(LIBCLC_TARGET_ARCH IN_LIST LIBCLC_ARCHS_SPIRV)
-  if(NOT LIBCLC_TARGET_OS STREQUAL vulkan AND NOT LIBCLC_USE_SPIRV_BACKEND)
-    if(LIBCLC_TARGET_ARCH STREQUAL spirv)
-      set(clang_triple spir--)
-    else()
-      set(clang_triple spir64--)
-    endif()
-  endif()
-endif()
 
 # Address space values.
 set(private_addrspace_val 0)
diff --git a/libclc/README.md b/libclc/README.md
index 169d59b75c5c6..3628265ff6edd 100644
--- a/libclc/README.md
+++ b/libclc/README.md
@@ -60,9 +60,9 @@ cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS="clang" 
-DCMAKE_BUILD_TYPE=Release
 #### Configure for SPIR-V targets
 ```
 cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS="clang" 
-DCMAKE_BUILD_TYPE=Release \
-  -DRUNTIMES_spirv-mesa-mesa3d_LLVM_ENABLE_RUNTIMES=libclc \
+  -DRUNTIMES_spirv32-mesa-mesa3d_LLVM_ENABLE_RUNTIMES=libclc \
   -DRUNTIMES_spirv64-mesa-mesa3d_LLVM_ENABLE_RUNTIMES=libclc \
-  -DLLVM_RUNTIME_TARGETS="spirv-mesa-mesa3d;spirv64-mesa-mesa3d"
+  -DLLVM_RUNTIME_TARGETS="spirv32-mesa-mesa3d;spirv64-mesa-mesa3d"
 ```
 
 To build multiple targets, pass them as a semicolon-separated list in

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to