[PATCH] D122444: [Driver][Linux] Remove D.Dir+"/../lib" from default search paths for LLVM_ENABLE_RUNTIMES builds

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 25 09:38:08 PDT 2022


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Linux.cpp:316
+  if (StringRef(D.Dir).startswith(SysRoot) &&
+      D.getVFS().exists(D.Dir + "/../lib/libc++.so"))
     addPathIfExists(D, D.Dir + "/../lib", Paths);
----------------
mgorny wrote:
> I wonder if this still wouldn't get in the way of some (non-Gentoo) people who have clang in `/usr/bin/clang` and 32-bit libc++ in `/usr/lib/libc++.so`.
It won't. /lib and /usr/lib follow this search directory. Since /lib and /usr/lib are usually the same, or at least include different sets of files, the user will not observe different behaviors.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122444/new/

https://reviews.llvm.org/D122444



More information about the cfe-commits mailing list