diff options
-rw-r--r-- | lib/Driver/ToolChains/Arch/ARM.cpp | 2 | ||||
-rw-r--r-- | test/Driver/arm-float-abi.c | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/Arch/ARM.cpp b/lib/Driver/ToolChains/Arch/ARM.cpp index c641e5c171..81aba54710 100644 --- a/lib/Driver/ToolChains/Arch/ARM.cpp +++ b/lib/Driver/ToolChains/Arch/ARM.cpp @@ -248,7 +248,7 @@ arm::FloatABI arm::getARMFloatABI(const ToolChain &TC, const ArgList &Args) { ABI = FloatABI::SoftFP; break; case llvm::Triple::Android: - ABI = (SubArch == 7) ? FloatABI::SoftFP : FloatABI::Soft; + ABI = (SubArch >= 7) ? FloatABI::SoftFP : FloatABI::Soft; break; default: // Assume "soft", but warn the user we are guessing. diff --git a/test/Driver/arm-float-abi.c b/test/Driver/arm-float-abi.c index e5b42c9696..9a76d1ee39 100644 --- a/test/Driver/arm-float-abi.c +++ b/test/Driver/arm-float-abi.c @@ -4,3 +4,13 @@ // ARMV7-ERROR: unsupported option '-mfloat-abi=hard' for target 'thumbv7' // NOERROR-NOT: unsupported option + +// RUN: %clang -target armv7-linux-androideabi21 %s -### -c 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID %s +// CHECK-ARM7-ANDROID-NOT: "-target-feature" "+soft-float" +// CHECK-ARM7-ANDROID: "-target-feature" "+soft-float-abi" + +// RUN: %clang -target armv8-linux-androideabi21 %s -### -c 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-ARM8-ANDROID %s +// CHECK-ARM8-ANDROID-NOT: "-target-feature" "+soft-float" +// CHECK-ARM8-ANDROID: "-target-feature" "+soft-float-abi" |