[llvm-dev] [CLANG BUG] Generate ELF for aarch64-apple-iphoneos
Moritz Angermann via llvm-dev
llvm-dev at lists.llvm.org
Sun Mar 12 17:21:08 PDT 2017
Hi Tim,
thanks for looking into this.
> On Mar 12, 2017, at 11:06 PM, Tim Northover <t.p.northover at gmail.com> wrote:
>
> 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.
What’s the recommended approach to be taken from llvms point of view?
with -arch and -march? How would I differentiate macosx, ios, watchos then?
What would I set for aarch64-unknown-linux-android instead of the target?
>> 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.
Is there some difference between aarch64 and arm64?
>
>> 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.
Thank you. That makes sense! Can I ask clang for the supported architectures then?
Cheers,
Moritz
More information about the llvm-dev
mailing list