HomePhabricator

[Driver] Incorporate -mfloat-abi in the computed triple on ARM

Authored by john.brawn on Oct 21 2020, 3:18 AM.

Description

[Driver] Incorporate -mfloat-abi in the computed triple on ARM

LLVM assumes that when it creates a call to a C library function it
can use the C calling convention. On ARM the effective calling
convention is determined from the target triple, however using
-mfloat-abi=hard on ARM means that calls to (and definitions of) C
library functions use the arm_aapcs_vfpcc calling convention which can
result in a mismatch.

Fix this by incorporating -mfloat-abi into the target triple, similar
to how -mbig-endian and -march/-mcpu are. This only works for EABI
targets and not Android or iOS, but there the float abi is fixed so
instead give an error.

Fixes PR45524

Differential Revision: https://reviews.llvm.org/D89573

Details

Committed
john.brawnOct 21 2020, 3:19 AM
Differential Revision
D89573: [Driver] Incorporate -mfloat-abi in the computed triple on ARM
Parents
rGa6336eab0c50: [ADT] Fix for ImmutableMapRef
Branches
Unknown
Tags
Unknown