llvm: Use HOST_ARCH in LLVM_TARGETS_TO_BUILD for builds

LLVM_TARGETS_TO_BUILD is needed to represent HOST_ARCH for
builds and target specific additions should use class-target
override

(From OE-Core rev: 5e6e08512e130951e66376ea43e4e6a98941b950)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2018-08-20 11:59:51 -07:00
committed by Richard Purdie
parent de1ba75423
commit 959fcc8129

View File

@@ -44,14 +44,15 @@ def get_llvm_arch(bb, d, arch_var):
else:
raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a)
def get_llvm_target_arch(bb, d):
return get_llvm_arch(bb, d, 'TARGET_ARCH')
def get_llvm_host_arch(bb, d):
return get_llvm_arch(bb, d, 'HOST_ARCH')
#
# Default to build all OE-Core supported target arches (user overridable).
#
LLVM_TARGETS ?= "${@get_llvm_target_arch(bb, d)}"
LLVM_TARGETS_prepend_x86 = "AMDGPU;"
LLVM_TARGETS_prepend_x86-64 = "AMDGPU;"
LLVM_TARGETS ?= "${@get_llvm_host_arch(bb, d)}"
LLVM_TARGETS_prepend_class-target_x86 = "AMDGPU;"
LLVM_TARGETS_prepend_class-target_x86-64 = "AMDGPU;"
ARM_INSTRUCTION_SET_armv5 = "arm"
ARM_INSTRUCTION_SET_armv4t = "arm"