summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2018-04-24 01:24:42 +0000
committerNico Weber <nicolasweber@gmx.de>2018-04-24 01:24:42 +0000
commit1c2c321b4763c4d3a2316f44aaacb609f824dc02 (patch)
treebd2085d93c65be72a6324f40d1d93ee0638b9ad6 /llvm
parenta425db5a1e40c082a71bc23dcf8a57306d0e3ef0 (diff)
downloadbcm5719-llvm-1c2c321b4763c4d3a2316f44aaacb609f824dc02.tar.gz
bcm5719-llvm-1c2c321b4763c4d3a2316f44aaacb609f824dc02.zip
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. llvm-svn: 330673
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/lit/lit/util.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/utils/lit/lit/util.py b/llvm/utils/lit/lit/util.py
index 8d4d9d25b19..e20c4ab9015 100644
--- a/llvm/utils/lit/lit/util.py
+++ b/llvm/utils/lit/lit/util.py
@@ -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
OpenPOWER on IntegriCloud