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

Weining Lu via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 14 17:16:43 PST 2023


Author: Weining Lu
Date: 2023-02-15T09:16:14+08:00
New Revision: 82c6e90d6a3d6773372b845a246adfed1682cb65

URL: https://github.com/llvm/llvm-project/commit/82c6e90d6a3d6773372b845a246adfed1682cb65
DIFF: https://github.com/llvm/llvm-project/commit/82c6e90d6a3d6773372b845a246adfed1682cb65.diff

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

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 errors (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.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D143806

Added: 
    

Modified: 
    clang/test/lit.cfg.py

Removed: 
    


################################################################################
diff  --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py
index cc55c3c44a413..839960e9633df 100644
--- a/clang/test/lit.cfg.py
+++ b/clang/test/lit.cfg.py
@@ -61,6 +61,7 @@
 tools = [
     'apinotes-test', 'c-index-test', 'clang-
diff ', 'clang-format', 'clang-repl', 'clang-offload-packager',
     'clang-tblgen', 'clang-scan-deps', 'opt', 'llvm-ifs', 'yaml2obj', 'clang-linker-wrapper',
+    'llvm-lto', 'llvm-lto2', 'llvm-profdata',
     ToolSubst('%clang_extdef_map', command=FindTool(
         'clang-extdef-mapping'), unresolved='ignore'),
 ]


        


More information about the cfe-commits mailing list