ClangTools: Use CtrlC Stub for clang tools on Windows

We got a report that using a clang-tidy would launch llvm-tokenizer,
which would not close when clang-tidy closes.

This resulted in zombie processes which would significantly
affect performance.

Change-Id: I1952be668b6352970cdb70c7fa622df77c2d175e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Cristian Adam
2022-07-13 16:12:37 +02:00
parent 86c6d1d09d
commit c505d6a72e

View File

@@ -67,6 +67,7 @@ void ClangToolRunner::init(const FilePath &outputDirPath, const Environment &env
QTC_CHECK(!m_outputDirPath.isEmpty());
m_process.setEnvironment(environment);
m_process.setUseCtrlCStub(true);
m_process.setWorkingDirectory(m_outputDirPath); // Current clang-cl puts log file into working dir.
connect(&m_process, &QtcProcess::done, this, &ClangToolRunner::onProcessDone);
}