[llvm] r330673 - Mostly revert r330672.
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 23 18:24:42 PDT 2018
Author: nico
Date: Mon Apr 23 18:24:42 2018
New Revision: 330673
URL: http://llvm.org/viewvc/llvm-project?rev=330673&view=rev
Log:
Mostly revert r330672.
The test is apparently needed e.g. for check-cfi on Windows where we get
'C:/b/slave/sanitizer-windows/build/./bin/clang.exe': command not found
without it. Try to fix the problem that was fixed by r330672 by also checking
for isabs() instead.
Modified:
llvm/trunk/utils/lit/lit/util.py
Modified: llvm/trunk/utils/lit/lit/util.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/util.py?rev=330673&r1=330672&r2=330673&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/util.py (original)
+++ llvm/trunk/utils/lit/lit/util.py Mon Apr 23 18:24:42 2018
@@ -193,6 +193,10 @@ def which(command, paths=None):
if paths is None:
paths = os.environ.get('PATH', '')
+ # Check for absolute match first.
+ if os.path.isabs(command) and os.path.isfile(command):
+ return os.path.normpath(command)
+
# Would be nice if Python had a lib function for this.
if not paths:
paths = os.defpath
More information about the llvm-commits
mailing list