r234661 - NaCl ARM: fix assembler float abi flags
Derek Schuff
dschuff at google.com
Fri Apr 10 16:07:19 PDT 2015
Author: dschuff
Date: Fri Apr 10 18:07:19 2015
New Revision: 234661
URL: http://llvm.org/viewvc/llvm-project?rev=234661&view=rev
Log:
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
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/nacl-direct.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=234661&r1=234660&r2=234661&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Apr 10 18:07:19 2015
@@ -7414,7 +7414,8 @@ void gnutools::Assemble::ConstructJob(Co
}
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);
Modified: cfe/trunk/test/Driver/nacl-direct.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/nacl-direct.c?rev=234661&r1=234660&r2=234661&view=diff
==============================================================================
--- cfe/trunk/test/Driver/nacl-direct.c (original)
+++ cfe/trunk/test/Driver/nacl-direct.c Fri Apr 10 18:07:19 2015
@@ -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++
More information about the cfe-commits
mailing list