diff options
| author | Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> | 2025-09-16 02:25:57 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-18 11:16:42 +0100 |
| commit | 70d32ed86b3f5a96621f741dd07a6fec97321cf4 (patch) | |
| tree | 90c5a6885588db7eb7bcbc4ff1105bc4c95e8597 | |
| parent | e30a2a5b7b7131c23b7eeec448d907b3175a5423 (diff) | |
| download | poky-70d32ed86b3f5a96621f741dd07a6fec97321cf4.tar.gz | |
clang: enable GPU backends for the opencl DISTRO_FEATURE
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.
(From OE-Core rev: f230b16eac089d2d06574a0593076478afc7455e)
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>
| -rw-r--r-- | meta/recipes-devtools/clang/clang_git.bb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb index 0009a95628..4462ab9712 100644 --- a/meta/recipes-devtools/clang/clang_git.bb +++ b/meta/recipes-devtools/clang/clang_git.bb | |||
| @@ -73,14 +73,14 @@ PACKAGECONFIG[libclang-python] = "-DCLANG_PYTHON_BINDINGS_VERSIONS=${PYTHON_BASE | |||
| 73 | OECMAKE_SOURCEPATH = "${S}/llvm" | 73 | OECMAKE_SOURCEPATH = "${S}/llvm" |
| 74 | 74 | ||
| 75 | # By default we build all the supported CPU architectures, and the GPU targets | 75 | # By default we build all the supported CPU architectures, and the GPU targets |
| 76 | # if the opengl or vulkan DISTRO_FEATURES are enabled. | 76 | # if the opencl, opengl or vulkan DISTRO_FEATURES are enabled. |
| 77 | # | 77 | # |
| 78 | # For target builds we default to building that specific architecture, BPF, and the GPU targets if required. | 78 | # For target builds we default to building that specific architecture, BPF, and the GPU targets if required. |
| 79 | # | 79 | # |
| 80 | # The available target list can be seen in the source code | 80 | # The available target list can be seen in the source code |
| 81 | # in the LLVM_ALL_TARGETS assignment: | 81 | # in the LLVM_ALL_TARGETS assignment: |
| 82 | # https://github.com/llvm/llvm-project/blob/main/llvm/CMakeLists.txt | 82 | # https://github.com/llvm/llvm-project/blob/main/llvm/CMakeLists.txt |
| 83 | LLVM_TARGETS_GPU ?= "${@bb.utils.contains_any('DISTRO_FEATURES', 'opengl vulkan', 'AMDGPU;NVPTX;SPIRV', '', d)}" | 83 | LLVM_TARGETS_GPU ?= "${@bb.utils.contains_any('DISTRO_FEATURES', 'opencl opengl vulkan', 'AMDGPU;NVPTX;SPIRV', '', d)}" |
| 84 | LLVM_TARGETS_TO_BUILD ?= "AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86;LoongArch;${LLVM_TARGETS_GPU}" | 84 | LLVM_TARGETS_TO_BUILD ?= "AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86;LoongArch;${LLVM_TARGETS_GPU}" |
| 85 | LLVM_TARGETS_TO_BUILD:class-target ?= "${@get_clang_host_arch(bb, d)};BPF;${LLVM_TARGETS_GPU}" | 85 | LLVM_TARGETS_TO_BUILD:class-target ?= "${@get_clang_host_arch(bb, d)};BPF;${LLVM_TARGETS_GPU}" |
| 86 | 86 | ||
