r187061 - Pass -fno-math-builtin from the Clang driver to -cc1 for the l32 arch.
Eli Bendersky
eliben at google.com
Wed Jul 24 11:20:14 PDT 2013
Author: eliben
Date: Wed Jul 24 13:20:14 2013
New Revision: 187061
URL: http://llvm.org/viewvc/llvm-project?rev=187061&view=rev
Log:
Pass -fno-math-builtin from the Clang driver to -cc1 for the l32 arch.
Added:
cfe/trunk/test/Driver/le32-toolchain.c
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=187061&r1=187060&r2=187061&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Jul 24 13:20:14 2013
@@ -3476,6 +3476,13 @@ void Clang::ConstructJob(Compilation &C,
options::OPT_fno_apple_pragma_pack, false))
CmdArgs.push_back("-fapple-pragma-pack");
+ // le32-specific flags:
+ // -fno-math-builtin: clang should not convert math builtins to intrinsics
+ // by default.
+ if (getToolChain().getArch() == llvm::Triple::le32) {
+ CmdArgs.push_back("-fno-math-builtin");
+ }
+
// Default to -fno-builtin-str{cat,cpy} on Darwin for ARM.
//
// FIXME: This is disabled until clang -cc1 supports -fno-builtin-foo. PR4941.
Added: cfe/trunk/test/Driver/le32-toolchain.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/le32-toolchain.c?rev=187061&view=auto
==============================================================================
--- cfe/trunk/test/Driver/le32-toolchain.c (added)
+++ cfe/trunk/test/Driver/le32-toolchain.c Wed Jul 24 13:20:14 2013
@@ -0,0 +1,4 @@
+// RUN: %clang -### -target le32-unknown-nacl %s 2>&1 | FileCheck -check-prefix=CHECK-DEFAULT %s
+
+// CHECK-DEFAULT: "-cc1" {{.*}} "-fno-math-builtin"
+
More information about the cfe-commits
mailing list