summaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
diff options
context:
space:
mode:
authorVladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com>2024-07-19 13:08:07 +0200
committerGitHub <noreply@github.com>2024-07-19 13:08:07 +0200
commit243af2ff217f65ef291232faa60779b86e01a967 (patch)
treeb9ca5b7a146c747b03aa0e2302881d8d544b4680 /lldb/packages/Python/lldbsuite/test/make/Makefile.rules
parent42a7c424b65050c5522e7055ab1486b572d86b69 (diff)
[LLDB][test] Improve SHELL detection on Windows in Makefile.rules (#99532)
In MinGW make, the `%windir%` variable has a lowercase name `$(windir)` when launched from cmd.exe, and `$(WINDIR)` name when launched from MSYS2, since MSYS2 represents standard Windows environment variables names in upper case. This commit makes Makefile.rules consider both run variants.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/make/Makefile.rules')
-rw-r--r--lldb/packages/Python/lldbsuite/test/make/Makefile.rules6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 597aa94566c2..be3ad684dd73 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -55,8 +55,10 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../
# Also reset BUILDDIR value because "pwd" returns cygwin or msys path
# which needs to be converted to windows path.
#----------------------------------------------------------------------
-ifeq "$(OS)" "Windows_NT"
- SHELL = $(WINDIR)\system32\cmd.exe
+ifeq "$(HOST_OS)" "Windows_NT"
+ # MinGW make gets $(windir) variable if launched from cmd.exe
+ # and $(WINDIR) if launched from MSYS2.
+ SHELL := $(or $(windir),$(WINDIR),C:\WINDOWS)\system32\cmd.exe
BUILDDIR := $(shell echo %cd%)
endif