https://github.com/dzhidzhoev created 
https://github.com/llvm/llvm-project/pull/99532

Since Windows 10 the case of 'windir' env variable was changed. Such error 
appears without that change:

```
make: \system32\cmd.exe: Command not found

Makefile.rules:628: recipe for target 'main.o' failed
```

>From 3ed6eecbb10421ada4b9e8e4355b91b21b31909b Mon Sep 17 00:00:00 2001
From: Vladislav Dzhidzhoev <vdzhidzh...@accesssoftek.com>
Date: Thu, 18 Jul 2024 19:27:55 +0200
Subject: [PATCH] [LLDB][test] Fix cmd.exe detection on recent Windows
 versions.

Since Windows 10 the case of 'windir' env variable was changed.
Such error appears without that change:

```
make: \system32\cmd.exe: Command not found

Makefile.rules:628: recipe for target 'main.o' failed
```
---
 lldb/packages/Python/lldbsuite/test/make/Makefile.rules | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules 
b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 3d562285ce9cc..4ade8c16b8e6f 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -80,8 +80,9 @@ endif
 # 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"
+       # Windows 10 and later has the lower-case 'windir' env variable.
+       SHELL := $(or $(windir),$(WINDIR),C:\WINDOWS)\system32\cmd.exe
        BUILDDIR := $(shell echo %cd%)
 endif
 

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

Reply via email to