[all-commits] [llvm/llvm-project] 0c6660: [Driver] Incorporate -mfloat-abi in the computed t...
john-brawn-arm via All-commits
all-commits at lists.llvm.org
Wed Oct 21 03:20:30 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0c66606230df39e0bf4190f1fc2c2e2fb37a81ea
https://github.com/llvm/llvm-project/commit/0c66606230df39e0bf4190f1fc2c2e2fb37a81ea
Author: John Brawn <john.brawn at arm.com>
Date: 2020-10-21 (Wed, 21 Oct 2020)
Changed paths:
M clang/lib/Driver/ToolChain.cpp
M clang/lib/Driver/ToolChains/Arch/ARM.cpp
M clang/lib/Driver/ToolChains/Arch/ARM.h
A clang/test/Driver/arm-float-abi-lto.c
M clang/test/Driver/arm-float-abi.c
A clang/test/Driver/arm-triple.c
M clang/test/Driver/windows-thumbv7em.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list