Index: lldb/test/Shell/helper/toolchain.py =================================================================== --- lldb/test/Shell/helper/toolchain.py +++ lldb/test/Shell/helper/toolchain.py @@ -90,11 +90,14 @@ # detect the include and lib paths, and find cl.exe and link.exe and create # substitutions for each of them that explicitly specify /I and /L paths cl = lit.util.which('cl') - link = lit.util.which('link') - if not cl or not link: + if not cl: return + # Don't use lit.util.which() for link.exe: In `git bash`, it will pick + # up /usr/bin/link (another name for ln). + link = os.path.join(os.path.dirname(cl), 'link.exe') + cl = '"' + cl + '"' link = '"' + link + '"' includes = os.getenv('INCLUDE', '').split(';')