[llvm-dev] [CLANG BUG] Generate ELF for aarch64-apple-iphoneos
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Sun Mar 12 08:06:38 PDT 2017
On 12 March 2017 at 08:33, Moritz Angermann via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I tried to build for aarch64-apple-iphoneos, but ended up getting ELF objects
As you've discovered, "ios" is the way this is spelled. Triples are in
a bit of a murky area between implementation detail and public
interface.
Clang has to support the commonly used ones (arm-linux-gnueabihf,
x86_64-linux-gnu, ...). But LLVM uses finer distinctions to determine
how it should generate code; for example that first ARM triple might
go through to the backend as "thumbv7-linux-gnueabihf" indicating code
generation for ARMv7 in Thumb mode.
This isn't ideal, and there's very low-level movement towards
improving the situation. But it hasn't come up in a while.
> The solution seems to be to use arm64-apple-ios as a target, aarch64-apple-ios however results in:
Darwin provides a limited set of named configurations rather than
using triples directly. The canonical way to compile for AArch64 there
is by specifying "-arch arm64" instead of -target.
> How can I obtain a list of supported target triples from clang?
You can't really. There are too many variants with differing degrees of support.
Cheers.
Tim.
More information about the llvm-dev
mailing list