diff mbox series

[5/5] libclc: Do not use spir libclc targets

Message ID 20260324230835.2363568-5-khem.raj@oss.qualcomm.com
State Changes Requested
Headers show
Series [1/5] clang/llvm: Upgrade to 22.x major release | expand

Commit Message

Khem Raj March 24, 2026, 11:08 p.m. UTC
From: Khem Raj <raj.khem@gmail.com>

These targets do not exist in llvm22 onwards we should use
spirv targets spirv-mesa3d- and/or spirv64-mesa3d-

Fixes
 WARNING: failed to create target machine for 'spir64-unknown-unknown': unable to get target for 'spir64-unknown-unknown', see --version and --triple.

Disable all targets except spirv, they do not build
ends up error like

| cd /mnt/b/yoe/master/sources/openembedded-core/build/tmp/work/x86_64-nativesdk-oesdk-linux/nativesdk-libclc/22.0.0/build && -o /mnt/b/yoe/master/sources/openembedded-core/build/tmp/work/x86_64-nativesdk-oesdk-linux/nativesdk-libclc/22.0.0/build/tahiti-amdgcn-mesa-mesa3d.bc /mnt/b/yoe/master/sources/openembedded-core/build/tmp/work/x86_64-nativesdk-oesdk-linux/nativesdk-libclc/22.0.0/build/obj.libclc.dir/tahiti-amdgcn-mesa-mesa3d/builtins.opt.tahiti-amdgcn-mesa-mesa3d.bc
| /bin/sh: line 1: -o: command not found
| ninja: build stopped: subcommand failed.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/clang/libclc_git.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/clang/libclc_git.bb b/meta/recipes-devtools/clang/libclc_git.bb
index db846d59a8..89262cf314 100644
--- a/meta/recipes-devtools/clang/libclc_git.bb
+++ b/meta/recipes-devtools/clang/libclc_git.bb
@@ -19,7 +19,10 @@  OECMAKE_SOURCEPATH = "${S}/libclc"
 B_NATIVE = "${B}-native"
 
 # Semicolon-separated list of targets to build
-LIBCLC_TARGETS ?= "all"
+LIBCLC_TARGETS ?= "spirv-mesa3d-;spirv64-mesa3d-"
+# opt tool does not support all targets
+LIBCLC_TARGETS:class-nativesdk = "spirv-mesa3d-;spirv64-mesa3d-"
+LIBCLC_TARGETS:class-target = "spirv-mesa3d-;spirv64-mesa3d-"
 
 EXTRA_OECMAKE += "-DLIBCLC_TARGETS_TO_BUILD='${LIBCLC_TARGETS}'"
 EXTRA_OECMAKE:append:class-target = " -DPREPARE_BUILTINS=${B_NATIVE}/utils/prepare_builtins"