diff mbox series

[5/5] llvm: Use HOST_ARCH in LLVM_TARGETS_TO_BUILD for builds

Message ID f4d69d8921ff500772915415680a92d31fcf2d74.1534791421.git.raj.khem@gmail.com
State Accepted
Commit 5e6e08512e130951e66376ea43e4e6a98941b950
Headers show
Series Use llvmpile for mesa on x86/x86-64 | expand

Commit Message

Khem Raj Aug. 20, 2018, 6:59 p.m. UTC
LLVM_TARGETS_TO_BUILD is needed to represent HOST_ARCH for
builds and target specific additions should use class-target
override

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-devtools/llvm/llvm_git.bb | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

-- 
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index d853d4151d..df7c1dddd3 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -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"