Error out if the user tries to use float-abi="hard" since it isn't
supported on darwin platforms. Previously clang issued no warnings or
erros and just passed the option to the backend, which had no effect on
code generation for targets using apcs.
rdar://problem/
22257950
Differential Revision: http://reviews.llvm.org/D12155
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245866
91177308-0d34-0410-b5e6-
96231b3b80d8
FloatABI = "soft";
}
}
+
+ if (Triple.isOSDarwin() && FloatABI == "hard")
+ D.Diag(diag::err_drv_unsupported_opt_for_target) << A->getAsString(Args)
+ << Triple.getArchName();
}
// If unspecified, choose the default based on the platform.
--- /dev/null
+// RUN: not %clang %s -target armv7-apple-ios -mfloat-abi=hard 2>&1 | FileCheck -check-prefix=ARMV7-HARD %s
+// RUN: %clang %s -target armv7-apple-ios -mfloat-abi=softfp -### 2>&1 | FileCheck -check-prefix=ARMV7-SOFTFP %s
+
+// ARMV7-HARD: unsupported option '-mfloat-abi=hard' for target 'thumbv7'
+// ARMV7-SOFTFP-NOT: unsupported option