Don't pass -fno-builtin-str{cat,cpy} to clang-cc, I forget we don't support that yet. PR4941.

llvm-svn: 81430
This commit is contained in:
Daniel Dunbar 2009-09-10 04:57:27 +00:00
parent 0f5c542a86
commit 4fa0811e4c
2 changed files with 12 additions and 6 deletions

View File

@ -730,6 +730,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
}
// Default to -fno-builtin-str{cat,cpy} on Darwin for ARM.
//
// FIXME: This is disabled until clang-cc supports -fno-builtin-foo. PR4941.
#if 0
if (getToolChain().getTriple().getOS() == llvm::Triple::Darwin &&
(getToolChain().getTriple().getArch() == llvm::Triple::arm ||
getToolChain().getTriple().getArch() == llvm::Triple::thumb)) {
@ -738,6 +741,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (!Args.hasArg(options::OPT_fbuiltin_strcpy))
CmdArgs.push_back("-fno-builtin-strcpy");
}
#endif
if (Arg *A = Args.getLastArg(options::OPT_traditional,
options::OPT_traditional_cpp))

View File

@ -1,10 +1,12 @@
// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s 2> %t &&
// RUN: grep -- "-fno-builtin-strcat" %t &&
// RUN: grep -- "-fno-builtin-strcpy" %t &&
// FIXME: Disable pending PR4941.
// RUX: clang -ccc-host-triple x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s 2> %t &&
// RUX: grep -- "-fno-builtin-strcat" %t &&
// RUX: grep -- "-fno-builtin-strcpy" %t &&
// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t &&
// RUN: not grep -- "-fno-builtin-strcat" %t &&
// RUN: not grep -- "-fno-builtin-strcpy" %t &&
// FIXME: Disable pending PR4941.
// RUX: clang -ccc-host-triple x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t &&
// RUX: not grep -- "-fno-builtin-strcat" %t &&
// RUX: not grep -- "-fno-builtin-strcpy" %t &&
// RUN: clang -ccc-no-clang -ccc-host-triple x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t &&
// RUN: not grep -- "-fno-builtin-strcat" %t &&