From 0cd18226a6be647e942a99c272f22aae66f459b4 Mon Sep 17 00:00:00 2001 From: agunashe <86270081+agunashe@users.noreply.github.com> Date: Thu, 25 Nov 2021 15:19:12 -0800 Subject: [PATCH] SWDEV-309909 - gitbash windows detection (#2415) Change-Id: I5cca12c25b9a1b4a8b7b077f586715c4a4feb5e9 --- bin/hipconfig | 4 ++-- bin/hipvars.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/hipconfig b/bin/hipconfig index e1b4ab5382..5ddb8e9b7d 100755 --- a/bin/hipconfig +++ b/bin/hipconfig @@ -201,7 +201,7 @@ if (!$printed or $p_full) { print "=== Environment Variables\n"; if ($isWindows) { print ("PATH=$ENV{PATH}\n"); - system("set | findstr /B /C:\"HIP\" /C:\"HSA\" /C:\"CUDA\" /C:\"LD_LIBRARY_PATH\""); + system("set | findstr //B //C:\"HIP\" //C:\"HSA\" //C:\"CUDA\" //C:\"LD_LIBRARY_PATH\""); } else { system("echo PATH=\$PATH"); system("env | egrep '^HIP|^HSA|^CUDA|^LD_LIBRARY_PATH'"); @@ -212,7 +212,7 @@ if (!$printed or $p_full) { if ($isWindows) { print "== Windows Display Drivers\n"; print "Hostname : "; system ("hostname"); - system ("wmic path win32_VideoController get AdapterCompatibility,InstalledDisplayDrivers,Name | findstr /B /C:\"Advanced Micro Devices\""); + system ("wmic path win32_VideoController get AdapterCompatibility,InstalledDisplayDrivers,Name | findstr //B //C:\"Advanced Micro Devices\""); } else { print "== Linux Kernel\n"; print "Hostname : "; system ("hostname"); diff --git a/bin/hipvars.pm b/bin/hipvars.pm index 736f4b7e6c..4d79262ea0 100644 --- a/bin/hipvars.pm +++ b/bin/hipvars.pm @@ -60,7 +60,7 @@ sub can_run { } } -$isWindows = $^O eq 'MSWin32'; +$isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); # # TODO: Fix rpath LDFLAGS settings