mirror of
https://github.com/intel/llvm.git
synced 2026-02-07 07:39:11 +08:00
[lldb/win] Fix TestIRMemoryMapWindows.test when running tests in git bash
lit.util.which('link') picks up the wrong link.exe in git bash, leading
to this error:
# command stderr:
/usr/bin/link: extra operand '/LIBPATH:C:\\Progra....'
Try '/usr/bin/link --help' for more information.
Instead, assume that link.exe is next to cl.exe.
Differential Revision: https://reviews.llvm.org/D109832
This commit is contained in:
@@ -90,11 +90,14 @@ def _use_msvc_substitutions(config):
|
||||
# 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(';')
|
||||
|
||||
Reference in New Issue
Block a user