This is an archive of the discontinued LLVM Phabricator instance.

[lit] Stop using PATH to lookup clang/lld/lldb unless requested
ClosedPublic

Authored by jhenderson on May 17 2021, 7:42 AM.

Details

Summary

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 suggests we should only use the build version in a monorepo setting; see also D96511).
  • The clangd testing (although 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)

Diff Detail

Event Timeline

jhenderson created this revision.May 17 2021, 7:42 AM
jhenderson requested review of this revision.May 17 2021, 7:42 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 17 2021, 7:42 AM
thopre accepted this revision.May 17 2021, 7:48 AM
This revision is now accepted and ready to land.May 17 2021, 7:48 AM

@thopre - as an aside: It'd be helpful if you could include some text in the text box when marking something "approved" through phabricator. There's a bug/limitation that approvals without text don't produce email to the mailing list - so it looks like a patch hasn't been reviewed yet (or has been committed without review).

@thopre - as an aside: It'd be helpful if you could include some text in the text box when marking something "approved" through phabricator. There's a bug/limitation that approvals without text don't produce email to the mailing list - so it looks like a patch hasn't been reviewed yet (or has been committed without review).

Oh sorry, I was not aware of that limitation. Will be careful to include a message in the future