]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
clang: enable GPU backends for the opencl DISTRO_FEATURE
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Mon, 15 Sep 2025 23:25:57 +0000 (02:25 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Sep 2025 10:08:20 +0000 (11:08 +0100)
Clang gates enabling of several backends (AMDGPU, NVPTX and SPIR-V) by
the GPU-related distro features (opengl, vulkan). Now as we got a
separate feature for OpenCL, enable those backends for the OpenCL-only
configurations.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/clang/clang_git.bb

index 0009a95628de95928fb4231f53aa4aeb6e076450..4462ab9712d9473c45a9fbae630d183d4349cf18 100644 (file)
@@ -73,14 +73,14 @@ PACKAGECONFIG[libclang-python] = "-DCLANG_PYTHON_BINDINGS_VERSIONS=${PYTHON_BASE
 OECMAKE_SOURCEPATH = "${S}/llvm"
 
 # By default we build all the supported CPU architectures, and the GPU targets
-# if the opengl or vulkan DISTRO_FEATURES are enabled.
+# if the opencl, opengl or vulkan DISTRO_FEATURES are enabled.
 #
 # For target builds we default to building that specific architecture, BPF, and the GPU targets if required.
 #
 # The available target list can be seen in the source code
 # in the LLVM_ALL_TARGETS assignment:
 # https://github.com/llvm/llvm-project/blob/main/llvm/CMakeLists.txt
-LLVM_TARGETS_GPU ?= "${@bb.utils.contains_any('DISTRO_FEATURES', 'opengl vulkan', 'AMDGPU;NVPTX;SPIRV', '', d)}"
+LLVM_TARGETS_GPU ?= "${@bb.utils.contains_any('DISTRO_FEATURES', 'opencl opengl vulkan', 'AMDGPU;NVPTX;SPIRV', '', d)}"
 LLVM_TARGETS_TO_BUILD ?= "AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86;LoongArch;${LLVM_TARGETS_GPU}"
 LLVM_TARGETS_TO_BUILD:class-target ?= "${@get_clang_host_arch(bb, d)};BPF;${LLVM_TARGETS_GPU}"