[PATCH] D87901: [Driver] Filter out <libdir>/gcc and <libdir>/gcc-cross if they do not exists

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 10:25:49 PDT 2020


MaskRay added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2469
   } Suffixes[] = {
-      // This is the normal place.
-      {"gcc/" + CandidateTriple.str(), "../..", true},
+      // This is the normal place if Clang is installed alongside with GCC,
+      // probably with the same prefix. But it's likely does not exists in
----------------
MaskRay wrote:
> > Clang is installed alongside with GCC
> 
> This is not correct. (1) clang does not need to be installed (it can be used in the build directory) (2) You can set --prefix (-B) and --sysroot to affect detected prefixes. Clang does not need to be beside GCC.
My point is about the accuracy of the comment. The choice `"gcc/" + CandidateTriple.str()` is unrelated to where Clang is installed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87901



More information about the cfe-commits mailing list