summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-11-21 21:29:59 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-11-21 21:29:59 +0000
commit83978ad237c7d52b423c4511e27a8758e5a7c721 (patch)
treed37b50f7ef8b118d9a6e2e80b865ac7880d32d59
parent6b57ae05e08029c54339421b9f39d8fb0015b28b (diff)
downloadclang-83978ad237c7d52b423c4511e27a8758e5a7c721.tar.gz
Merge r285525 into 3.9.1: Fix clang installed path to handle case where clang is invoked through a symlink
See https://llvm.org/PR30840 git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_39@287580 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/Tools.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 6821addfe4..0795b152c6 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -7644,7 +7644,7 @@ void darwin::Linker::AddLinkArgs(Compilation &C, const ArgList &Args,
// and 'ld' will use its default mechanism to search for libLTO.dylib.
if (Version[0] >= 133) {
// Search for libLTO in <InstalledDir>/../lib/libLTO.dylib
- StringRef P = llvm::sys::path::parent_path(D.getInstalledDir());
+ StringRef P = llvm::sys::path::parent_path(D.Dir);
SmallString<128> LibLTOPath(P);
llvm::sys::path::append(LibLTOPath, "lib");
llvm::sys::path::append(LibLTOPath, "libLTO.dylib");