[Lldb-commits] [lldb] [lldb][Windows] Make RM_RF actually delete files (PR #222950)

via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 11 07:01:28 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

`RM_RF` on Windows was `rd /s /q`, which only removes directories, so `clean::` silently did nothing and `|| (exit 0)` hid the failure. Tests that delete a build artifact and rebuild then never regenerate it.

This does not match the behavior of `RM_RF` on POSIX and causes issues in Swiftlang.

---
Full diff: https://github.com/llvm/llvm-project/pull/222950.diff


1 Files Affected:

- (modified) lldb/packages/Python/lldbsuite/test/make/Makefile.rules (+1-1) 


``````````diff
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 0ded62beb6714..4ba77c931963e 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -44,7 +44,7 @@ ifeq "$(OS)" "Windows_NT"
 	CP_R = xcopy $(subst /,\,$(1)) $(subst /,\,$(2)) /s /e /y
 	RM = del $(subst /,\,$(1)) > nul 2>&1 || (exit 0)
 	RM_F = del /f /q $(subst /,\,$(1))
-	RM_RF = $(if $(strip $(1)),rd /s /q $(subst /,\,$(1)) > nul 2>&1 || (exit 0))
+	RM_RF = $(if $(strip $(1)),(del /f /q $(subst /,\,$(1)) > nul 2>&1 & rd /s /q $(subst /,\,$(1)) > nul 2>&1) || (exit 0))
 	LN_SF = mklink /D "$(subst /,\,$(2))" "$(subst /,\,$(1))"
 	ECHO = echo $(1);
 	ECHO_TO_FILE = echo $(subst ',,$(1))> "$(subst /,\,$(2))"

``````````

</details>


https://github.com/llvm/llvm-project/pull/222950


More information about the lldb-commits mailing list