[Lldb-commits] [lldb] [lldb][test] Stop deleting the clang module cache between lit runs (PR #226174)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 24 07:06:58 PDT 2026


https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/226174

A test binary's DWARF names the .pcm files in this cache, and make will not rebuild an up-to-date `a.out` to regenerate them. Deleting it leaves every ClangImporter test pointing at a deleted module.

Deleting is also redundant: a changed compiler already forces a rebuild through `tool_prereq` inside of `Makefile.rules`.

On Windows, in swiftlang, this fixes 26 tests in `check-lldb-swift` (ClangImporter/DWARFImporter/cxx-interop) and 105 "module file does not exist" errors.

>From 06536d70bd6bd4cd88523a08aacee9d4bb4be5e3 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 24 Sep 2026 15:03:11 +0100
Subject: [PATCH] [lldb][test] Stop deleting the clang module cache between lit
 runs

---
 lldb/test/API/lit.cfg.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index 7b0d12dedf311c..c144ecae6b00d1 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -254,7 +254,6 @@ def delete_module_cache(path):
     dotest_cmd += ["--lldb-module-cache-dir", config.lldb_module_cache]
 
 if is_configured("clang_module_cache"):
-    delete_module_cache(config.clang_module_cache)
     dotest_cmd += ["--clang-module-cache-dir", config.clang_module_cache]
 
 if is_configured("lldb_executable"):



More information about the lldb-commits mailing list