]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
llvm: set LLVM_HOST_TRIPLE for cross-compilation
authorHaseeb Ashraf <haseeb.ashraf@siemens.com>
Sat, 25 Jan 2025 05:41:18 +0000 (10:41 +0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jan 2025 15:47:06 +0000 (15:47 +0000)
commit19f649f47352f7e12508abd88a862e95979d152d
tree797d3659ceafbe6fe8ac9f48fb7d8408ac519e1c
parentff469ab2e865063bbc529031bbfd76cba5040073
llvm: set LLVM_HOST_TRIPLE for cross-compilation

The correct way to configure cmake for cross-compilation includes
setting the LLVM_HOST_TRIPLE as well.

Documentation Ref:
https://github.com/llvm/llvm-project/blob/llvmorg-19.1.6/llvm/docs/HowToCrossCompileLLVM.rst#configuring-cmake

This fixes bug when LLVM is cross-compiled for AAarch64 but it
was getting built with the triple of native build system instead of
the TARGET_SYS (aarch64-oe-linux) in my case.

`No available targets are compatible with triple "x86_64-unknown-linux-gnu"`

Signed-off-by: Haseeb Ashraf <haseeb.ashraf@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/llvm/llvm_19.1.6.bb