forked from OSchip/llvm-project
NaCl ARM: fix assembler float abi flags
Summary: tools::arm::getARMFloatABI() was falling back to guessing soft-float because it wasn't seeing the GNUEABIHF environment from ComputeEffectivClangTriple when it was called from gnutools::Assemble::ConstructJob. Fix by using the effective clang triple in gnutools::Assemble, which now matches the -triple flag used by cc1 and ClangAs jobs. Reviewers: jvoung Subscribers: rengolin, jfb, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D8902 llvm-svn: 234661
This commit is contained in:
parent
dd50f7421c
commit
a419e1ce6c
|
@ -7414,7 +7414,8 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
}
|
||||
|
||||
StringRef ARMFloatABI = tools::arm::getARMFloatABI(
|
||||
getToolChain().getDriver(), Args, Triple);
|
||||
getToolChain().getDriver(), Args,
|
||||
llvm::Triple(getToolChain().ComputeEffectiveClangTriple(Args)));
|
||||
CmdArgs.push_back(Args.MakeArgString("-mfloat-abi=" + ARMFloatABI));
|
||||
|
||||
Args.AddLastArg(CmdArgs, options::OPT_march_EQ);
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
// CHECK-ARM: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}arm-nacl{{/|\\\\}}usr{{/|\\\\}}include"
|
||||
// CHECK-ARM: "-internal-isystem" "{{.*}}{{/|\\\\}}..{{/|\\\\}}arm-nacl{{/|\\\\}}include"
|
||||
// CHECK-ARM: as{{(.exe)?}}"
|
||||
// CHECK-ARM: "-mfloat-abi=hard"
|
||||
// CHECK-ARM: ld{{(.exe)?}}"
|
||||
// CHECK-ARM: "--build-id"
|
||||
// CHECK-ARM: "-m" "armelf_nacl"
|
||||
|
@ -71,6 +72,8 @@
|
|||
// CHECK-ARM-NOV7: "-triple" "armv7--nacl-gnueabihf"
|
||||
// CHECK-ARM-NOV7: "-target-abi" "aapcs-linux"
|
||||
// CHECK-ARM-NOV7: "-mfloat-abi" "hard"
|
||||
// CHECK-ARM-NOV7: as{{(.exe)?}}"
|
||||
// CHECK-ARM-NOV7: "-mfloat-abi=hard"
|
||||
|
||||
// Test clang c++ include dirs and link line when using clang++
|
||||
|
||||
|
|
Loading…
Reference in New Issue