[Lldb-commits] [lldb] [LLDB][test] Fix cmd.exe detection on recent Windows versions (PR #99532)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 18 10:36:08 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Vladislav Dzhidzhoev (dzhidzhoev)
<details>
<summary>Changes</summary>
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
```
---
Full diff: https://github.com/llvm/llvm-project/pull/99532.diff
1 Files Affected:
- (modified) lldb/packages/Python/lldbsuite/test/make/Makefile.rules (+3-2)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/99532
More information about the lldb-commits
mailing list