Pass -march, -mcpu, -mfpu to linuxtools assembler.

llvm-svn: 154389
This commit is contained in:
Evgeniy Stepanov 2012-04-10 09:05:40 +00:00
parent e81111ca71
commit 70cb3d623b
2 changed files with 35 additions and 0 deletions

View File

@ -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);

View File

@ -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"