This is an archive of the discontinued LLVM Phabricator instance.

[Clang][Test] Add llvm-lto, llvm-lto2 and llvm-profdata to the tool substitutions list
ClosedPublic

Authored by SixWeining on Feb 10 2023, 10:22 PM.

Details

Summary

Similar to issue fixed in D107155, some lit tests invoke llvm-lto,
llvm-lto2 and llvm-profdata without going through the substitution
system. While the test runner correctly picks up these binaries from
the build directory, it doesn't print its absolute path. When copying
the invocations when reproducing test failures, this can result in
command not found: llvm-lto or other erros (caused by using wrong
version of the tool).

This patch adds these tools to the tools variable in
clang/test/lit.cfg.py which will then call add_tool_substitutions.

Diff Detail

Event Timeline

SixWeining created this revision.Feb 10 2023, 10:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2023, 10:22 PM
Herald added a subscriber: inglorion. · View Herald Transcript
SixWeining requested review of this revision.Feb 10 2023, 10:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2023, 10:22 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dblaikie accepted this revision.Feb 13 2023, 1:27 PM

Seems a bit unfortunate that clang tests are using these tools, but fair enough - they clearly are, so suitable to include them here, I guess.

This revision is now accepted and ready to land.Feb 13 2023, 1:27 PM