[Buildroot] Include Host Architecture in LLVM_TARGETS_TO_BUILD
valentin.korenblit at smile.fr
Mon Jun 4 08:40:43 UTC 2018
On 01/06/2018 21:28, Joseph Kogut wrote:
> Hi Valentin,
> I'm using the Clang compiler frontend to LLVM that you added to
> Buildroot (thanks!), and the package that I'm working on building
> requires Clang to support the host architecture, as well as the
We currently don't support using Clang as a toolchain component.
libLLVM and libclang are instaled on the target so they can be used
by other packages. Buildroot does not provide a way to choose between
gcc or clang to compile a package, so your packaging should search
for host-clang explicitly.
This topic was discussed during the meeting in February:
> I was wondering if you knew of a way to detect and enable the host
> architecture for LLVM, as I think enabling all supported architectures
> would be wasteful.
As you say, we control the backends that are going to be built in
lib/Target by using LLVM_TARGETS_TO_BUILD. In your case you could
append $(call qstrip,$(BR2_HOSTARCH)) in HOST_LLVM_CONF_OPTS.
However, be careful because if your host architecture is x86_64 you'll
need to pass "X86" as both backends share the code in lib/Target/X86.
> Best regards,
More information about the buildroot