[llvm-dev] Adding minimal target support to build clang

Justin Bogner via llvm-dev llvm-dev at lists.llvm.org
Sun Aug 19 23:08:30 PDT 2018


John Paul Adrian Glaubitz via llvm-dev <llvm-dev at lists.llvm.org> writes:
> Hi!
>
> In Debian, we have recently run into the situation that the package
> qttools-opensource-src has added LLVM's clang parser as a build dependency
> with the effect that the package can no longer be built for a couple of
> architectures like alpha or ia64 [1].
>
> From my current understanding, qttools-opensource-src is merely using the
> parser part in clang to parse C/C++ code for code analysis which is not
> necessarily an architecture-specific task.

Building llvm without any backends is supposed to work (and has in the
past!), but it appears to fail quite a few tests currently. You can try
this by calling cmake with -DLLVM_TARGETS_TO_BUILD=''. I don't know if
clang works in that configuration, especially given David's point about
inline assembly.

> Now, does anyone know whether it would be possible to enable this feature
> on any given architecture without having to add a full target backend to
> LLVM? Maybe we could just build an LLVM variant on unsupported targets
> with the x86 backend enabled (in case it's mandatory to have at least
> one backend enabled).
>
> Thanks,
> Adrian
>
>> [1]
> https://buildd.debian.org/status/package.php?p=qttools-opensource-src&suite=sid


More information about the llvm-dev mailing list