Don't pass -fno-builtin-str{cat,cpy} to clang-cc, I forget we don't support that yet. PR4941.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81430 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index ad335b3..ca986e5 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -730,6 +730,9 @@
}
// 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 @@
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))
diff --git a/test/Driver/arm-darwin-builtin.c b/test/Driver/arm-darwin-builtin.c
index f79a167..5da8074 100644
--- a/test/Driver/arm-darwin-builtin.c
+++ b/test/Driver/arm-darwin-builtin.c
@@ -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 &&