[PATCH] D102630: [lit] Stop using PATH to lookup clang/lld/lldb unless requested

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 07:42:14 PDT 2021


jhenderson created this revision.
jhenderson added reviewers: JDevlieghere, aprantl, MaskRay, thopre, dblaikie, teemperor.
Herald added subscribers: usaxena95, kadircet, delcypher.
jhenderson requested review of this revision.
Herald added subscribers: lldb-commits, ilya-biryukov, aheejin.
Herald added projects: LLDB, LLVM.

This patch stops lit from looking on the PATH for clang, lld and other users of use_llvm_tool (currently only the debuginfo-tests) unless the call explicitly requests to opt into using the PATH. When not opting in, tests will only look in the build directory.

See the mailing list thread starting from https://lists.llvm.org/pipermail/llvm-dev/2021-May/150421.html.

`use_clang` is used from:

- The main clang tests (we don't want to test the installed version here, only the built version).
- The debuginfo tests (this one is possibly debatable, but the conversation in D95339 <https://reviews.llvm.org/D95339> suggests we should only use the build version in a monorepo setting; see also D96511 <https://reviews.llvm.org/D96511>).
- The clangd testing (although rGc29513f7e023f125c6d221db179dc40b79e5c074 <https://reviews.llvm.org/rGc29513f7e023f125c6d221db179dc40b79e5c074> suggests clang is not actually used).
- The lldb shell testing (this appears to deliberately allow using the installed version).

`use_lld` is used from:

- The main lld tests (we don't want to test the installed version here, only the built version).
- The lldb shell testing (this appears to deliberately allow using the installed version).

`use_llvm_tool` is used from:

- `use_lld` and `use_clang`
- The debuginfo_tests to lookup LLDB (see above reasoning for clang)
- The tests for lit itself (not in a way where the behaviour change is relevant)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102630

Files:
  lldb/test/Shell/helper/toolchain.py
  llvm/utils/lit/lit/llvm/config.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102630.345869.patch
Type: text/x-patch
Size: 5019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210517/91b859da/attachment.bin>


More information about the llvm-commits mailing list