mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-30 23:21:04 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330673 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bdd8ac7826
commit
3eb9432cd2
@ -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…
Reference in New Issue
Block a user