Recognize -mno-implicit-float option for x86 as well as ARM. <rdar://13180731>
authorBob Wilson <bob.wilson@apple.com>
Sun, 10 Feb 2013 15:25:44 +0000 (15:25 +0000)
committerBob Wilson <bob.wilson@apple.com>
Sun, 10 Feb 2013 15:25:44 +0000 (15:25 +0000)
For x86 targets, we've been using the -msoft-float option to control passing
the no-implicit-float option to cc1. Since the -mno-implicit-float option is
now accepted by the driver, this just makes it work for x86 the same as it
does for ARM targets.

llvm-svn: 174836

clang/lib/Driver/Tools.cpp
clang/test/Driver/flags.c

index 77c7d22..c5499de 100644 (file)
@@ -1202,7 +1202,8 @@ void Clang::AddX86TargetArgs(const ArgList &Args,
 
   if (Args.hasFlag(options::OPT_msoft_float,
                    options::OPT_mno_soft_float,
-                   false))
+                   false) ||
+      Args.hasArg(options::OPT_mno_implicit_float))
     CmdArgs.push_back("-no-implicit-float");
 
   if (const char *CPUName = getX86TargetCPU(Args, getToolChain().getTriple())) {
index 698a54e..d328b82 100644 (file)
@@ -7,5 +7,8 @@
 // RUN: %clang -target i386-apple-darwin9 -### -S -mno-soft-float %s -msoft-float 2> %t.log
 // RUN: grep '"-no-implicit-float"' %t.log
 
+// RUN: %clang -target i386-apple-darwin9 -### -S -mno-implicit-float %s 2> %t.log
+// RUN: grep '"-no-implicit-float"' %t.log
+
 // RUN: %clang -target armv7-apple-darwin10 -### -S -mno-implicit-float %s 2> %t.log
-// RUN: grep '"-no-implicit-float"' %t.log | count 1
+// RUN: grep '"-no-implicit-float"' %t.log