This revision was automatically updated to reflect the committed changes. Closed by commit rL366575: [clangd] Disable background-index on lit-tests by default (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D64990?vs=210820&id=210822#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64990/new/ https://reviews.llvm.org/D64990 Files: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp =================================================================== --- clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp +++ clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp @@ -355,8 +355,12 @@ InputStyle = JSONStreamStyle::Delimited; LogLevel = Logger::Verbose; PrettyPrint = true; + // Disable background index on lit tests by default to prevent disk writes. + if (!EnableBackgroundIndex.getNumOccurrences()) + EnableBackgroundIndex = false; // Ensure background index makes progress. - BackgroundQueue::preventThreadStarvationInTests(); + else if (EnableBackgroundIndex) + BackgroundQueue::preventThreadStarvationInTests(); } if (Test || EnableTestScheme) { static URISchemeRegistry::Add<TestScheme> X(
Index: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp =================================================================== --- clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp +++ clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp @@ -355,8 +355,12 @@ InputStyle = JSONStreamStyle::Delimited; LogLevel = Logger::Verbose; PrettyPrint = true; + // Disable background index on lit tests by default to prevent disk writes. + if (!EnableBackgroundIndex.getNumOccurrences()) + EnableBackgroundIndex = false; // Ensure background index makes progress. - BackgroundQueue::preventThreadStarvationInTests(); + else if (EnableBackgroundIndex) + BackgroundQueue::preventThreadStarvationInTests(); } if (Test || EnableTestScheme) { static URISchemeRegistry::Add<TestScheme> X(
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits