summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-05-23 15:23:16 +0000
committerPetr Hosek <phosek@chromium.org>2019-05-23 15:23:16 +0000
commit762d008a7c35c84468f713b93748190a52f0dfe5 (patch)
treecb764a119cf37f1f45fb8a022cb72891381e4bb4 /clang/lib/Driver/ToolChain.cpp
parent85200645c6e86fb684b6e10eb8193f460e31c18d (diff)
downloadbcm5719-llvm-762d008a7c35c84468f713b93748190a52f0dfe5.tar.gz
bcm5719-llvm-762d008a7c35c84468f713b93748190a52f0dfe5.zip
[Driver] Try normalized triple when looking for C++ libraries
This addresses the issue introduced in r361432 where we would only try effective triple but not the normalized one as we do for other runtimes. Differential Revision: https://reviews.llvm.org/D62286 llvm-svn: 361504
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
-rw-r--r--clang/lib/Driver/ToolChain.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 3b0e8f2dbaa..08d1ebb75d7 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -80,6 +80,11 @@ ToolChain::ToolChain(const Driver &D, const llvm::Triple &T,
llvm::sys::path::append(P, "..", "lib", D.getTargetTriple(), "c++");
if (getVFS().exists(P))
getLibraryPaths().push_back(P.str());
+
+ P.assign(D.Dir);
+ llvm::sys::path::append(P, "..", "lib", Triple.str(), "c++");
+ if (getVFS().exists(P))
+ getLibraryPaths().push_back(P.str());
}
P.assign(D.ResourceDir);
OpenPOWER on IntegriCloud