forked from qt-creator/qt-creator
Clangd: Let users limit the worker thread count
This is particularly interesting for indexing, where users might prefer a slower-building index with less CPU load. Change-Id: Id44c58e9041df2857cd0772e71345673b14623f3 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -387,6 +387,8 @@ static BaseClientInterface *clientInterface(const Utils::FilePath &jsonDbDir)
|
||||
indexingOption += "=0";
|
||||
Utils::CommandLine cmd{CppTools::ClangdSettings::clangdFilePath(),
|
||||
{indexingOption, "--limit-results=0"}};
|
||||
if (CppTools::ClangdSettings::workerThreadLimit() != 0)
|
||||
cmd.addArg("-j=" + QString::number(CppTools::ClangdSettings::workerThreadLimit()));
|
||||
if (!jsonDbDir.isEmpty())
|
||||
cmd.addArg("--compile-commands-dir=" + jsonDbDir.toString());
|
||||
if (clangdLog().isDebugEnabled())
|
||||
|
||||
Reference in New Issue
Block a user