diff options
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Driver/Tools.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/Driver/Tools.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp index f6926813643..a38c204223a 100644 --- a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp +++ b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp @@ -6368,6 +6368,18 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } #endif + // Disable some builtins on OpenBSD because they are just not + // right... + if (getToolChain().getTriple().isOSOpenBSD()) { + CmdArgs.push_back("-fno-builtin-malloc"); + CmdArgs.push_back("-fno-builtin-calloc"); + CmdArgs.push_back("-fno-builtin-realloc"); + CmdArgs.push_back("-fno-builtin-valloc"); + CmdArgs.push_back("-fno-builtin-free"); + CmdArgs.push_back("-fno-builtin-strdup"); + CmdArgs.push_back("-fno-builtin-strndup"); + } + // Enable rewrite includes if the user's asked for it or if we're generating // diagnostics. // TODO: Once -module-dependency-dir works with -frewrite-includes it'd be |
