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.

llvm-svn: 113212
This commit is contained in:
Daniel Dunbar 2010-09-07 17:07:49 +00:00
parent 773777727a
commit 1eaf5c6abb
1 changed files with 7 additions and 1 deletions

View File

@ -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.