Driver/Darwin: Don't pass -demangle to an iOS linker, which may not understand

it.

llvm-svn: 119809
This commit is contained in:
Daniel Dunbar 2010-11-19 17:51:40 +00:00
parent 929bd68229
commit 6d776eb1e8
1 changed files with 7 additions and 1 deletions

View File

@ -2441,7 +2441,13 @@ void darwin::Link::AddLinkArgs(Compilation &C,
// 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)) {
//
// FIXME: We temporarily avoid passing -demangle to any iOS linker, because
// unfortunately we can't be guaranteed that the linker version used there
// will match the linker version detected at configure time. We need the
// universal driver.
if (Version[0] >= 100 && !Args.hasArg(options::OPT_Z_Xlinker__no_demangle) &&
!getDarwinToolChain().isTargetIPhoneOS()) {
// Don't pass -demangle to ld_classic.
//
// FIXME: This is a temporary workaround, ld should be handling this.