[llvm-dev] [CLANG BUG] Generate ELF for aarch64-apple-iphoneos

Moritz Angermann via llvm-dev llvm-dev at lists.llvm.org
Sun Mar 12 00:33:36 PST 2017


Hi,

I’ve stumbled across something curious with the Relase_40 I have built here:

I tried to build for aarch64-apple-iphoneos, but ended up getting ELF objects

$ clang -target aarch64-apple-iphoneos -c tmp.ll -o tmp.o
warning: overriding the module target triple with aarch64-apple-iphoneos [-Woverride-module]
1 warning generated.
bin
$ file tmp.o
tmp.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), not stripped

The contents of tmp.ll seems irrelevant, the result can be reproduced with an empty file.

Result is the same with

clang version 4.0.0 (https://github.com/llvm-mirror/clang.git 559aa046fe3260d8640791f2249d7b0d458b5700) (http://llvm.org/git/llvm.git 3de71b0e7b7a3b5df49f05a4653d4b1ecb70bfab)
Target: x86_64-apple-darwin16.4.0
Thread model: posix

and

Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.4.0
Thread model: posix

The solution seems to be to use arm64-apple-ios as a target, aarch64-apple-ios however results in:
error: unknown target triple 'unknown-apple-macosx10.4.0', please use -triple or -arch

How can I obtain a list of supported target triples from clang?

Cheers,
 Moritz


More information about the llvm-dev mailing list