[PATCH] D121992: [Clang] [Driver] Add option to set alternative toolchain path
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 20 19:42:40 PDT 2022
hubert.reinterpretcast added inline comments.
================
Comment at: clang/include/clang/Driver/Driver.h:152
+ /// Alternative toolchain path in prior to sysroot.
+ std::string OverlayToolChainPath;
----------------
I don't understand the use of "in" in the comment. Perhaps "used" was meant?
================
Comment at: clang/lib/Driver/ToolChains/Linux.cpp:270-271
+ addPathIfExists(D, ExtraPath + "/usr/lib/../" + OSLibDir, Paths);
+ addPathIfExists(D, ExtraPath + "/lib", Paths);
+ addPathIfExists(D, ExtraPath + "/usr/lib", Paths);
+ }
----------------
The `/lib` and `/usr/lib` cases should occur after the multiarch and `OSLibDir` cases taken from the sysroot.
================
Comment at: clang/test/Driver/gcc-toolchain.cpp:42
+/// Test option to add 'overlay platform toolchain'
+// RUN: %clangxx %s -### --target=powerpc64le-linux-gnu \
+// RUN: --overlay-platform-toolchain=%S/Inputs/powerpc64le-linux-gnu-tree/gcc-11.2.0 \
----------------
Should specify a sysroot and test relative ordering between resource paths taken from the "overlay platform toochain" and the sysroot.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121992/new/
https://reviews.llvm.org/D121992
More information about the cfe-commits
mailing list