[PATCH 2/2] allow_hipcc_tests: Allow native Windows (windows-msvc)

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
Make allow_hipcc_tests allow Windows as well.  Slightly tweak the
returned string to be more generic.  Add comment about why we do the
istarget check at all.

We only allow windows-msvc, and not mingw, as the AMD ROCm compiler on
Windows targets x86_64-pc-windows-msvc.

Change-Id: I45262f2fe24455ade6075eded2cd7df03979c6cc
---
 gdb/testsuite/lib/rocm.exp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp
index 025fa63da6f..439870b8263 100644
--- a/gdb/testsuite/lib/rocm.exp
+++ b/gdb/testsuite/lib/rocm.exp
@@ -138,8 +138,12 @@ gdb_caching_proc allow_hip_tests {} {
 	return {0 "remote debugging"}
     }
 
-    if {![istarget "*-linux*"]} {
-	return {0 "target platform is not Linux"}
+    # Check a hardcoded set of targets as an optimization, so that we
+    # save one external program invocation (of 'gdb --configuration')
+    # when GDB is not configured with amd-dbgapi support.  External
+    # program invocations have a non-negligible time cost on Windows.
+    if {![istarget "*-linux*"] && ![istarget "*-*-windows-msvc*"]} {
+	return {0 "target platform is not supported"}
     }
 
     # Ensure that GDB is built with amd-dbgapi support.
-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.