[llvm-dev] Simple program fails to compile depending on target os

Moritz Angermann via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 3 20:44:55 PDT 2016


>> I would however suggest to add -mtriple=armv7-apple-ios and -mtriple=armv7-apple-darwin
>> to the test in test/CodeGen/ARM/ghc-tcreturn-lowered.ll, so that potential regressions,
>> as found.
> 
> The "-darwin" triple shouldn't really be used. Actually, I'm not sure
> why it even exists: it could produce pretty much anything without
> anyone inside Apple caring as part of their day job.
> 
> I'm happy to add tests, but personally I'd suggest
> "thumbv7-apple-ios7.0" and "armv7-apple-ios7.0" as the triples (iOS
> 7.0 is a reasonable baseline). But I'd also suggest GHC uses
> "thumbv7-apple-iosN". It's likely to be more performant than "armv7"
> and is certainly a lot more tested (as the Clang default).

That’s the one I stated out to begin with. Currently ghc, uses
armv7-apple-darwin10, which however generates:

     warning: .macosx_version_min should only be used for macosx targets
            .macosx_version_min 10, 0

this triple that produces usable libs though. (thumbv7-apple-darwin10 does
compile, however the produced library fails to work properly, which is likely
a separate ghc bug).

I’ll see that ghc used x86_64-apple-macosx10 for macOS builds then instead
of the current x86_64-apple-darwin10.0.0.

In the interim I don’t see a way around armv7-apple-darwin10 for the armv7
builds, as it crashes llc until 3.9 otherwise. For arm64, we’ll use
arm64-apple-ios7.0.0.

Any further suggestions are welcome!

Cheers,
 Moritz


More information about the llvm-dev mailing list