mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-23 04:16:42 +00:00
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
This commit is contained in:
parent
00c5136820
commit
e478018779
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user