[cfe-commits] r155431 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/linux-as.c
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Tue Apr 24 02:05:32 PDT 2012
Author: eugenis
Date: Tue Apr 24 04:05:31 2012
New Revision: 155431
URL: http://llvm.org/viewvc/llvm-project?rev=155431&view=rev
Log:
Only pass -mcpu, -march, -mfpu to linux-as on ARM.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/linux-as.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=155431&r1=155430&r2=155431&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Apr 24 04:05:31 2012
@@ -5068,6 +5068,10 @@
StringRef ARMFloatABI = getARMFloatABI(getToolChain().getDriver(), Args,
getToolChain().getTriple());
CmdArgs.push_back(Args.MakeArgString("-mfloat-abi=" + ARMFloatABI));
+
+ Args.AddLastArg(CmdArgs, options::OPT_march_EQ);
+ Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ);
+ Args.AddLastArg(CmdArgs, options::OPT_mfpu_EQ);
} else if (getToolChain().getArch() == llvm::Triple::mips ||
getToolChain().getArch() == llvm::Triple::mipsel ||
getToolChain().getArch() == llvm::Triple::mips64 ||
@@ -5095,10 +5099,6 @@
CmdArgs.push_back("-EL");
}
- Args.AddLastArg(CmdArgs, options::OPT_march_EQ);
- Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ);
- Args.AddLastArg(CmdArgs, options::OPT_mfpu_EQ);
-
Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
options::OPT_Xassembler);
Modified: cfe/trunk/test/Driver/linux-as.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/linux-as.c?rev=155431&r1=155430&r2=155431&view=diff
==============================================================================
--- cfe/trunk/test/Driver/linux-as.c (original)
+++ cfe/trunk/test/Driver/linux-as.c Tue Apr 24 04:05:31 2012
@@ -49,3 +49,8 @@
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=ARM-HARDFP %s
// CHECK-ARM-HARDFP: as{{(.exe)?}}" "-mfloat-abi=hard"
+//
+// RUN: %clang -target ppc-linux -mcpu=invalid-cpu -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=PPC-NO-MCPU %s
+// CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu"
More information about the cfe-commits
mailing list