[cfe-commits] r144381 - /cfe/trunk/lib/Driver/ToolChains.cpp

Bob Wilson bob.wilson at apple.com
Thu Nov 10 23:47:04 PST 2011


Author: bwilson
Date: Fri Nov 11 01:47:04 2011
New Revision: 144381

URL: http://llvm.org/viewvc/llvm-project?rev=144381&view=rev
Log:
Search for libstdc++.dylib in llvm-gcc's files on darwin10. rdar://10419079

Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=144381&r1=144380&r2=144381&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Nov 11 01:47:04 2011
@@ -334,8 +334,11 @@
   // Unfortunately, we still might depend on a few of the libraries that are
   // only available in the gcc library directory (in particular
   // libstdc++.dylib). For now, hardcode the path to the known install location.
+  // FIXME: This should get ripped out someday.  However, when building on
+  // 10.6 (darwin10), we're still relying on this to find libstdc++.dylib.
   llvm::sys::Path P(getDriver().Dir);
   P.eraseComponent(); // .../usr/bin -> ../usr
+  P.appendComponent("llvm-gcc-4.2");
   P.appendComponent("lib");
   P.appendComponent("gcc");
   switch (getTriple().getArch()) {
@@ -709,6 +712,8 @@
     }
 
     // Otherwise, look in the root.
+    // FIXME: This should be removed someday when we don't have to care about
+    // 10.6 and earlier, where /usr/lib/libstdc++.dylib does not exist.
     if ((llvm::sys::fs::exists("/usr/lib/libstdc++.dylib", Exists) || !Exists)&&
       (!llvm::sys::fs::exists("/usr/lib/libstdc++.6.dylib", Exists) && Exists)){
       CmdArgs.push_back("/usr/lib/libstdc++.6.dylib");





More information about the cfe-commits mailing list