[PATCH] D62286: [Driver] Try normalized triple when looking for C++ libraries

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 22 23:16:07 PDT 2019


phosek created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rC Clang

https://reviews.llvm.org/D62286

Files:
  clang/lib/Driver/ToolChain.cpp


Index: clang/lib/Driver/ToolChain.cpp
===================================================================
--- clang/lib/Driver/ToolChain.cpp
+++ clang/lib/Driver/ToolChain.cpp
@@ -80,6 +80,11 @@
     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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62286.200873.patch
Type: text/x-patch
Size: 543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190523/3251b2b6/attachment.bin>


More information about the cfe-commits mailing list