[PATCH] D64990: [clangd] Disable background-index on lit-tests by default
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 19 06:40:20 PDT 2019
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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64990.210822.patch
Type: text/x-patch
Size: 822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190719/50bfd474/attachment.bin>
More information about the cfe-commits
mailing list