[PATCH] D88850: [lit, windows] Fix the search for git tools on Windows to check the path first
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 17:18:26 PDT 2020
zturner added inline comments.
================
Comment at: llvm/utils/lit/lit/llvm/config.py:26
path = None
lit_tools_dir = getattr(config, 'lit_tools_dir', None)
required_tools = ['cmp.exe', 'grep.exe', 'sed.exe', 'diff.exe', 'echo.exe']
----------------
stella.stamenova wrote:
> rnk wrote:
> > I thought the implication was that getToolsPath will fail if you pass it None. I thought the suggestion was to make the default value here by `[]`, so it will succeed.
> getToolsPath (and other calls in that code path) check for None, so passing None works correctly.
I misspoke. The old code was:
```
if config.lit_tools_dir:`
```
which fails if `lit_tools_dir` is not actually an attribute of `config`. That was the problem I was trying to solve.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88850/new/
https://reviews.llvm.org/D88850
More information about the llvm-commits
mailing list