[PATCH] D50547: [Driver] Use normalized triples for multiarch runtime path
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 21 14:28:13 PDT 2018
phosek added inline comments.
================
Comment at: clang/lib/Driver/ToolChain.cpp:372
- const Driver &D = getDriver();
- SmallString<128> P(D.ResourceDir);
- llvm::sys::path::append(P, D.getTargetTriple(), "lib");
- if (getVFS().exists(P)) {
+ for (const auto &LibPath : getLibraryPaths()) {
+ SmallString<128> P(LibPath);
----------------
One possible alternative I've considered would be to simply return `-lclang_rt.<component>.<suffix>` instead of returning the full path when `getLibraryPaths()` is not empty. That should work because we add all paths in this list as `-L` in `AddFilePathLibArgs` and it's more consistent with e.g. `-lgcc_s`.
Repository:
rC Clang
https://reviews.llvm.org/D50547
More information about the cfe-commits
mailing list