diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-09-07 17:07:49 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-09-07 17:07:49 +0000 |
commit | bcf1da8ff6ab007a23a8d1be8e950d92cee4241e (patch) | |
tree | b73845f2535f34430e7049dabe897e8fb43de9df /lib/Driver/Tools.cpp | |
parent | fbc5b49322577e03ed780dcdf5be514871ec381d (diff) |
Driver/Darwin: Don't pass -demangle to the linker when we know it is going to
use ld_classic. This is a temporary workaround, the linkr itself should handle
this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index a055904a89..0215cdfa61 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2204,7 +2204,13 @@ void darwin::Link::AddLinkArgs(const ArgList &Args, // Newer linkers support -demangle, pass it if supported and not disabled by // the user. if (Version[0] >= 100 && !Args.hasArg(options::OPT_Z_Xlinker__no_demangle)) { - CmdArgs.push_back("-demangle"); + // Don't pass -demangle to ld_classic. + // + // FIXME: This is a temporary workaround, ld should be handling this. + bool UsesLdClassic = (getToolChain().getArch() == llvm::Triple::x86 && + Args.hasArg(options::OPT_static)); + if (!UsesLdClassic) + CmdArgs.push_back("-demangle"); } // Derived from the "link" spec. |