summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-19 02:45:38 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-19 02:45:38 +0000
commit8517abc30dbcd9961a9ffe5af9322c5dc0ea3bfd (patch)
tree65f5f32b3388a5399cb72a97ad1defa1dd8ad2d2 /clang/lib/Driver/Tools.cpp
parent1ca8af9b7659982a439307a65dbd59d6005a83d5 (diff)
downloadbcm5719-llvm-8517abc30dbcd9961a9ffe5af9322c5dc0ea3bfd.tar.gz
bcm5719-llvm-8517abc30dbcd9961a9ffe5af9322c5dc0ea3bfd.zip
Enable -mconstructor-aliases by default on non-darwin platforms.
The linker bug holding this back is Darwin-specific. llvm-svn: 96655
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp5
1 files changed, 5 insertions, 0 deletions
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 <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.
OpenPOWER on IntegriCloud