diff options
author | John McCall <rjmccall@apple.com> | 2010-02-19 02:45:38 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-02-19 02:45:38 +0000 |
commit | d0c2ec44e093011256b6a0f57d455f36dffdea70 (patch) | |
tree | 72e26b204c48c118931d9378ecf49966462d8b13 /lib/Driver/Tools.cpp | |
parent | ba7bc5584b8d46f4e8deb3a9d363256908fa86ea (diff) |
Enable -mconstructor-aliases by default on non-darwin platforms.
The linker bug holding this back is Darwin-specific.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96655 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index e65abaedd5..d2391b391c 100644 --- a/lib/Driver/Tools.cpp +++ b/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 <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. |