diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-04-10 09:05:40 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-04-10 09:05:40 +0000 |
commit | e9b4d98f97de6657d4ff77478ba69730f08b9b81 (patch) | |
tree | 62498421ea6235a2b1554c83aa601db146a98b76 | |
parent | 8250016fb9491fcfde7fce05230d66e267944484 (diff) |
Pass -march, -mcpu, -mfpu to linuxtools assembler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154389 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/Tools.cpp | 4 | ||||
-rw-r--r-- | test/Driver/linux-as.c | 31 |
2 files changed, 35 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index e575092481..ae5a9b9c7e 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -5089,6 +5089,10 @@ void linuxtools::Assemble::ConstructJob(Compilation &C, const JobAction &JA, 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); diff --git a/test/Driver/linux-as.c b/test/Driver/linux-as.c new file mode 100644 index 0000000000..22eac0d2dd --- /dev/null +++ b/test/Driver/linux-as.c @@ -0,0 +1,31 @@ +// Check passing options to the assembler for ARM targets. +// +// RUN: %clang -target arm-linux -### \ +// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=ARM %s +// CHECK-ARM: as{{(.exe)?}}" +// +// RUN: %clang -target arm-linux -mcpu=cortex-a8 -### \ +// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=ARM-MCPU %s +// CHECK-ARM-MCPU: as{{(.exe)?}}" "-mcpu=cortex-a8" +// +// RUN: %clang -target arm-linux -mfpu=neon -### \ +// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=ARM-MFPU %s +// CHECK-ARM-MFPU: as{{(.exe)?}}" "-mfpu=neon" +// +// RUN: %clang -target arm-linux -march=armv7-a -### \ +// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=ARM-MARCH %s +// CHECK-ARM-MARCH: as{{(.exe)?}}" "-march=armv7-a" +// +// RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \ +// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=ARM-ALL %s +// CHECK-ARM-ALL: as{{(.exe)?}}" "-march=armv7-a" "-mcpu=cortex-a8" "-mfpu=neon" +// +// RUN: %clang -target armv7-linux -mcpu=cortex-a8 -### \ +// RUN: -no-integrated-as -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=ARM-TARGET %s +// CHECK-ARM-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mcpu=cortex-a8" |