diff options
author | Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> | 2025-04-10 05:54:48 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-04-11 11:44:22 +0100 |
commit | 18ca038b7e03ac57565c9d5d3d9f6844fea92415 (patch) | |
tree | 7b61efe58f13602274993b379b43e6d8f6c71392 | |
parent | 377a1cd8238c92d414bc98eef4186e87372c4094 (diff) | |
download | poky-18ca038b7e03ac57565c9d5d3d9f6844fea92415.tar.gz |
llvm: enable more targets to build
Pull in the list of targets being enabled by meta-clang in order to
make the libllvm from OE-Core runtime compatible with the one built by
the clang recipe inside meta-clang.
(From OE-Core rev: 672a21e16a2f4aadc588b367f0fd1ff1df7b5c67)
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/llvm/llvm_20.1.2.bb | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/meta/recipes-devtools/llvm/llvm_20.1.2.bb b/meta/recipes-devtools/llvm/llvm_20.1.2.bb index f968217fa2..b51ab703a1 100644 --- a/meta/recipes-devtools/llvm/llvm_20.1.2.bb +++ b/meta/recipes-devtools/llvm/llvm_20.1.2.bb | |||
@@ -54,24 +54,6 @@ OECMAKE_SOURCEPATH = "${S}/llvm" | |||
54 | 54 | ||
55 | LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install" | 55 | LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install" |
56 | 56 | ||
57 | def get_llvm_arch(bb, d, arch_var): | ||
58 | import re | ||
59 | a = d.getVar(arch_var) | ||
60 | if re.match(r'(i.86|athlon|x86.64)$', a): return 'X86' | ||
61 | elif re.match(r'arm$', a): return 'ARM' | ||
62 | elif re.match(r'armeb$', a): return 'ARM' | ||
63 | elif re.match(r'aarch64$', a): return 'AArch64' | ||
64 | elif re.match(r'aarch64_be$', a): return 'AArch64' | ||
65 | elif re.match(r'loongarch(32|64|)$', a): return 'LoongArch' | ||
66 | elif re.match(r'mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' | ||
67 | elif re.match(r'riscv(32|64)(eb|)$', a): return 'RISCV' | ||
68 | elif re.match(r'p(pc|owerpc)(|64)', a): return 'PowerPC' | ||
69 | else: | ||
70 | raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a) | ||
71 | |||
72 | def get_llvm_host_arch(bb, d): | ||
73 | return get_llvm_arch(bb, d, 'HOST_ARCH') | ||
74 | |||
75 | PACKAGECONFIG ??= "libllvm libclc spirv-llvm-translator" | 57 | PACKAGECONFIG ??= "libllvm libclc spirv-llvm-translator" |
76 | # if optviewer OFF, force the modules to be not found or the ones on the host would be found | 58 | # if optviewer OFF, force the modules to be not found or the ones on the host would be found |
77 | PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" | 59 | PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" |
@@ -82,7 +64,7 @@ PACKAGECONFIG[spirv-llvm-translator] = "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR | |||
82 | # | 64 | # |
83 | # Default to build all OE-Core supported target arches (user overridable). | 65 | # Default to build all OE-Core supported target arches (user overridable). |
84 | # | 66 | # |
85 | LLVM_TARGETS ?= "AMDGPU;NVPTX;SPIRV;${@get_llvm_host_arch(bb, d)}" | 67 | LLVM_TARGETS ?= "AMDGPU;AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86;LoongArch;NVPTX;SPIRV" |
86 | 68 | ||
87 | ARM_INSTRUCTION_SET:armv5 = "arm" | 69 | ARM_INSTRUCTION_SET:armv5 = "arm" |
88 | ARM_INSTRUCTION_SET:armv4t = "arm" | 70 | ARM_INSTRUCTION_SET:armv4t = "arm" |