[clang-tools-extra] [clangd] [C++20] [Modules] Don't reuse prebuilt module files on windows (PR #193426)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 23:15:42 PDT 2026


================
@@ -29,6 +29,23 @@ llvm::cl::opt<bool> DebugModulesBuilder(
                    "Remember to remove them later after debugging."),
     llvm::cl::init(false));
 
+// Disable reusing prebuilt module files on windows by default.
+// As clangd may lock these module files on windows to prevent
+// these module files to be updated by buiild system on windows.
+//
+// See https://github.com/clangd/clangd/issues/2497 for details.
+#ifdef _WIN32
+constexpr bool DisablePrebuiltModuleFileReuseDefault = true;
+#else
+constexpr bool DisablePrebuiltModuleFileReuseDefault = false;
+#endif
+
+llvm::cl::opt<bool> DisablePrebuiltModuleFileReuse(
+    "disable-prebuilt-module-file-reuse",
----------------
ChuanqiXu9 wrote:

Done

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


More information about the cfe-commits mailing list