[PATCH] D88850: [lit, windows] Fix the search for git tools on Windows to check the path first
Stella Stamenova via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 13:27:04 PDT 2020
stella.stamenova created this revision.
stella.stamenova added reviewers: rnk, zturner, aganea.
Herald added subscribers: llvm-commits, delcypher.
Herald added a project: LLVM.
stella.stamenova requested review of this revision.
Always check the path first, even if lit_tools_dir is not set or None. This will make sure that existing configurations work and are not overwritten by the git tools. Once we know why git tools don't always work and can be reasonably sure that they will, we can check for git tools first.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88850
Files:
llvm/utils/lit/lit/llvm/config.py
Index: llvm/utils/lit/lit/llvm/config.py
===================================================================
--- llvm/utils/lit/lit/llvm/config.py
+++ llvm/utils/lit/lit/llvm/config.py
@@ -25,10 +25,11 @@
path = None
lit_tools_dir = getattr(config, 'lit_tools_dir', None)
required_tools = ['cmp.exe', 'grep.exe', 'sed.exe', 'diff.exe', 'echo.exe']
- if lit_tools_dir:
- path = self.lit_config.getToolsPath(lit_tools_dir,
- config.environment['PATH'],
- required_tools)
+
+ path = self.lit_config.getToolsPath(lit_tools_dir,
+ config.environment['PATH'],
+ required_tools)
+
if path is None:
path = self._find_git_windows_unix_tools(required_tools)
if path is not None:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88850.296285.patch
Type: text/x-patch
Size: 984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201005/71e32fc3/attachment.bin>
More information about the llvm-commits
mailing list