forked from qt-creator/qt-creator
ClangTools: Remove dependency to libclang and custom clang binary
Before this change, we've invoked a custom clang binary that had clazy statically compiled into it. The invocation also ensured that the diagnostics were serialized to a file, so that libclang could be used afterwards to read them. As the clazy-standalone executable supports exporting diagnostics to a YAML file now (just as clang-tidy) and Qt Creator ships it already, rely on that executable alone instead of the clang/libclang combo. While we do not depend on any clang header or library at build-time now, the CompilerOptionsBuilder constructor still needs the CLANG_VERSION and CLANG_RESOURCE_DIR pieces from llvm-config. This dependency should be removed as next. Change-Id: I4fa5753ab09008fd24bc5247b28c4836b5e8ca45 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -236,12 +236,8 @@ QList<RunnerCreator> ClangToolRunWorker::runnerCreators()
|
||||
if (m_diagnosticConfig.isClangTidyEnabled())
|
||||
creators << [this]() { return createRunner<ClangTidyRunner>(); };
|
||||
|
||||
if (m_diagnosticConfig.isClazyEnabled()) {
|
||||
if (!qEnvironmentVariable("QTC_USE_CLAZY_STANDALONE_PATH").isEmpty())
|
||||
creators << [this]() { return createRunner<ClazyStandaloneRunner>(); };
|
||||
else
|
||||
creators << [this]() { return createRunner<ClazyPluginRunner>(); };
|
||||
}
|
||||
if (m_diagnosticConfig.isClazyEnabled())
|
||||
creators << [this]() { return createRunner<ClazyStandaloneRunner>(); };
|
||||
|
||||
return creators;
|
||||
}
|
||||
@@ -388,7 +384,6 @@ void ClangToolRunWorker::onRunnerFinishedWithSuccess(const QString &filePath)
|
||||
QString errorMessage;
|
||||
const Diagnostics diagnostics = tool()->read(runner->outputFileFormat(),
|
||||
outputFilePath,
|
||||
filePath,
|
||||
m_projectFiles,
|
||||
&errorMessage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user