Driver/Darwin: Don't pass -demangle to an iOS linker, which may not understand
authorDaniel Dunbar <daniel@zuster.org>
Fri, 19 Nov 2010 17:51:40 +0000 (17:51 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 19 Nov 2010 17:51:40 +0000 (17:51 +0000)
it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119809 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 338c5418255126de7352dcd69e7da4b43f28e772..20977f239b5950d009a0c7bd1e5c9f3281c91562 100644 (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.