[Driver][ARM] Warn about -mabi= for assembler input
authorFangrui Song <i@maskray.me>
Mon, 26 Jun 2023 19:28:02 +0000 (12:28 -0700)
committerFangrui Song <i@maskray.me>
Mon, 26 Jun 2023 19:28:02 +0000 (12:28 -0700)
commitfe5bab537270e21469b8dfe09aae2ec11f1aca7f
tree9fd9cc2a87235ae6e5d9c875bb43b08fb309ed01
parent4fa3e93e68df41465b7accf6be9c57f06b877dac
[Driver][ARM] Warn about -mabi= for assembler input

Previously, Clang Driver reported a warning when assembler input was assembled
with the -mabi= option. D152856 added TargetSpecific to -mabi= option and
reported an error for such a case. This change restores the previous behavior by
reporting a warning.

GCC translates -mabi={apcs-gnu,atpcs} to gas -meabi=gnu and other -mabi= values
to -meabi=5. We don't support setting e_flags to any value other than
EF_ARM_EABI_VER5.

Close https://github.com/ClangBuiltLinux/linux/issues/1878

Reviewed By: michaelplatings

Differential Revision: https://reviews.llvm.org/D153691
clang/lib/Driver/ToolChains/Arch/ARM.cpp
clang/test/Driver/arm-abi.c