summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2011-02-10 09:11:48 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2011-02-10 09:11:48 +0000
commitf5201bcd3b57e6b96ae3293b3a9c31ab49dd967c (patch)
tree9d9cd0090653b5bde2103647010194c5e77ea865
parent6cdf2ea98e9952a57768a1fcdce8850089263260 (diff)
downloadllvm-f5201bcd3b57e6b96ae3293b3a9c31ab49dd967c.tar.gz
llvm-f5201bcd3b57e6b96ae3293b3a9c31ab49dd967c.tar.bz2
llvm-f5201bcd3b57e6b96ae3293b3a9c31ab49dd967c.tar.xz
lit/Util.py: On Cygwin, 'PATHEXT' may exist but it should not be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125272 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/lit/lit/Util.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/lit/lit/Util.py b/utils/lit/lit/Util.py
index ad4adf2f34..5635f50bae 100644
--- a/utils/lit/lit/Util.py
+++ b/utils/lit/lit/Util.py
@@ -64,7 +64,11 @@ def which(command, paths = None):
paths = os.defpath
# Get suffixes to search.
- pathext = os.environ.get('PATHEXT', '').split(os.pathsep)
+ # On Cygwin, 'PATHEXT' may exist but it should not be used.
+ if os.pathsep == ';':
+ pathext = os.environ.get('PATHEXT', '').split(';')
+ else:
+ pathext = ['']
# Search the paths...
for path in paths.split(os.pathsep):