aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2011-11-11 07:47:04 +0000
committerBob Wilson <bob.wilson@apple.com>2011-11-11 07:47:04 +0000
commit5a5dcdc9314204f103b879b5033a736af0e3462b (patch)
tree26e8599ae4c66abb6ec0d15b81a753c76fccccdf
parent40f6975af82dfe35bb25c2423cc095061bc51f3b (diff)
Search for libstdc++.dylib in llvm-gcc's files on darwin10. rdar://10419079
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144381 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/ToolChains.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 399a1c62a6..b232bc0584 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -334,8 +334,11 @@ void DarwinClang::AddLinkSearchPathArgs(const ArgList &Args,
// 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 @@ void DarwinClang::AddCXXStdlibLibArgs(const ArgList &Args,
}
// 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");