@@ -35,10 +35,10 @@ def get_clang_arch(bb, d, arch_var):
elif re.match('aarch64$', a): return 'AArch64'
elif re.match('aarch64_be$', a): return 'AArch64'
elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips'
- elif re.match('riscv32$', a): return 'riscv32'
- elif re.match('riscv64$', a): return 'riscv64'
+ elif re.match('riscv32$', a): return 'RISCV'
+ elif re.match('riscv64$', a): return 'RISCV'
elif re.match('p(pc|owerpc)(|64)', a): return 'PowerPC'
- elif re.match('loongarch64$', a): return 'loongarch64'
+ elif re.match('loongarch64$', a): return 'LoongArch'
else:
bb.note("'%s' is not a primary llvm architecture" % a)
return ""
@@ -115,8 +115,12 @@ LLVM_BUILD_TOOLS;LLVM_USE_HOST_TOOLS;LLVM_CONFIG_PATH;LLVM_EXTERNAL_SPIRV_HEADER
# Default to build all OE-Core supported target arches (user overridable).
# Gennerally setting LLVM_TARGETS_TO_BUILD = "" in local.conf is ok in most simple situations
# where only one target architecture is needed along with just one build arch (usually X86)
-#
+# Core tier targets:
+# AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;LoongArch;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SPIRV;SystemZ;VE;WebAssembly;X86;XCore
+# Known experimental targets: ARC;CSKY;DirectX;M68k;Xtensa
+
LLVM_TARGETS_TO_BUILD ?= "AMDGPU;AArch64;ARM;BPF;Mips;PowerPC;RISCV;X86;LoongArch;NVPTX;SPIRV"
+LLVM_TARGETS_TO_BUILD:class-target ?= "${@get_clang_host_arch(bb, d)};AMDGPU;BPF;NVPTX;SPIRV"
LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ?= ""
On target its sufficient to build what mesa needs + one host target It should speed up the build. Fix bug in function mapping target architecture to LLVM backend Reduces size of libLLVM Before - 131M May 6 20:42 ./clang-libllvm/usr/lib/libLLVM.so.20.1 After - 93M May 6 18:47 ./clang-libllvm/usr/lib/libLLVM.so.20.1 Signed-off-by: Khem Raj <raj.khem@gmail.com> --- v2: Fix bug in function mapping target architecture to LLVM backend meta/recipes-devtools/clang/clang_git.bb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)