From 83978ad237c7d52b423c4511e27a8758e5a7c721 Mon Sep 17 00:00:00 2001 From: Mehdi Amini <mehdi.amini@apple.com> Date: Mon, 21 Nov 2016 21:29:59 +0000 Subject: [PATCH] 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 --- lib/Driver/Tools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 6821addfe4a..0795b152c69 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"); -- GitLab