From 8517abc30dbcd9961a9ffe5af9322c5dc0ea3bfd Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 19 Feb 2010 02:45:38 +0000 Subject: Enable -mconstructor-aliases by default on non-darwin platforms. The linker bug holding this back is Darwin-specific. llvm-svn: 96655 --- clang/lib/Driver/Tools.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Driver/Tools.cpp') diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index e65abaedd58..d2391b391cd 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -799,6 +799,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("Arguments"); } + // Enable -mconstructor-aliases except on darwin, where we have to + // work around a linker bug; see . + if (getToolChain().getTriple().getOS() != llvm::Triple::Darwin) + CmdArgs.push_back("-mconstructor-aliases"); + // This is a coarse approximation of what llvm-gcc actually does, both // -fasynchronous-unwind-tables and -fnon-call-exceptions interact in more // complicated ways. -- cgit v1.2.3