<div dir="ltr"><div>Hi all,</div><div><br></div><div>Summary: can we stop allowing clang/lld to be picked up from the PATH environment when running testing?</div><div><br></div><div>Details:<br></div><div><br></div><div>As part of my work on a cross-project testsuite (see <a href="https://reviews.llvm.org/D95339">https://reviews.llvm.org/D95339</a> and other related patches), I noticed that where lit has been configured using `use_clang()` or `use_lld()` the respective tools will be selected from the system PATH, if they aren't found in the build directory. If users are running check-* to run the relevant tests, this isn't an issue, as the tools will be built (and therefore used in preference).</div><div><br></div><div>I personally, and I'm sure many others, routinely don't use these check-* targets, preferring to manually build and run the subset of tests that have the potential to be impacted by my change. Potentially this leaves room for human error (e.g. a misconfigured build bot or simply a user error when checking things) to not build clang (or lld) in a clean environment, and as such, the "wrong" tool might be used, causing spurious tests failures (or worse, spurious passes).</div><div><br></div><div>An environment variable ('CLANG') can be specified to specify the clang executable to use, in preference to a built one or one on the PATH. I plan to make a similar change for LLD soon too. As such, do we need the "use the PATH version" behaviour anymore? Dropping it will allow simplifying code and reduce room for human error.</div><div><br></div><div>Thanks,</div><div><br></div><div>James<br></div></div>