Pass -fno-math-builtin from the Clang driver to -cc1 for the l32 arch.

llvm-svn: 187061
This commit is contained in:
Eli Bendersky 2013-07-24 18:20:14 +00:00
parent 46a4426286
commit c95cfe876e
2 changed files with 11 additions and 0 deletions

View File

@ -3476,6 +3476,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
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.

View File

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