[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.
This commit is contained in:
parent
42a7c424b6
commit
243af2ff21
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user