[Lldb-commits] [PATCH] D109832: [lldb/win] Fix TestIRMemoryMapWindows.test when running tests in git bash

2021-09-16 Thread Adrian McCarthy via Phabricator via lldb-commits
amccarth added a comment.

LGTM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109832/new/

https://reviews.llvm.org/D109832

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109832: [lldb/win] Fix TestIRMemoryMapWindows.test when running tests in git bash

2021-09-16 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG99ece01a0f57: [lldb/win] Fix TestIRMemoryMapWindows.test 
when running tests in git bash (authored by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109832/new/

https://reviews.llvm.org/D109832

Files:
  lldb/test/Shell/helper/toolchain.py


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(';')


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(';')
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109832: [lldb/win] Fix TestIRMemoryMapWindows.test when running tests in git bash

2021-09-15 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added a reviewer: amccarth.
Herald added a subscriber: pengfei.
thakis requested review of this revision.

lit.util.which('link') picks up the wrong link.exe in git bash, leading
to this error:

1. command stderr: /usr/bin/link: extra operand '/LIBPATH:C:\\Program Files 
(x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64' Try '/usr/bin/link 
--help' for more information.

Instead, assume that link.exe is next to cl.exe.


https://reviews.llvm.org/D109832

Files:
  lldb/test/Shell/helper/toolchain.py


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(';')


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(';')
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits