Enable -mconstructor-aliases by default on non-darwin platforms.

The linker bug holding this back is Darwin-specific.

llvm-svn: 96655
This commit is contained in:
John McCall 2010-02-19 02:45:38 +00:00
parent 1ca8af9b76
commit 8517abc30d
1 changed files with 5 additions and 0 deletions

View File

@ -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 <rdar://problem/7651567>.
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.