[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
This commit is contained in:
Petr Hosek 2019-05-23 15:23:16 +00:00
parent 85200645c6
commit 762d008a7c
1 changed files with 5 additions and 0 deletions

View File

@ -80,6 +80,11 @@ ToolChain::ToolChain(const Driver &D, const llvm::Triple &T,
llvm::sys::path::append(P, "..", "lib", D.getTargetTriple(), "c++"); llvm::sys::path::append(P, "..", "lib", D.getTargetTriple(), "c++");
if (getVFS().exists(P)) if (getVFS().exists(P))
getLibraryPaths().push_back(P.str()); 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); P.assign(D.ResourceDir);