forked from qt-creator/qt-creator
ClangTools: Always use CompilerOptionsBuilder for clang tools
We do not ship clang-cl anymore which makes it impossible to run clang with MSVC options. Secondly we used to we tweak compiler options quite a bit so why not to switch to CompilerOptionsBuilder totally? Change-Id: Id323cb554587afaea7d9aa530e947a45a03922d1 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -613,7 +613,6 @@ void QbsProject::updateAfterBuild()
|
||||
m_projectData = projectData;
|
||||
updateProjectNodes();
|
||||
updateBuildTargetData();
|
||||
updateCppCompilerCallData();
|
||||
if (m_extraCompilersPending) {
|
||||
m_extraCompilersPending = false;
|
||||
updateCppCodeModel();
|
||||
@@ -1039,53 +1038,6 @@ void QbsProject::updateCppCodeModel()
|
||||
m_cppCodeModelUpdater->update({this, cToolChain, cxxToolChain, k, rpps});
|
||||
}
|
||||
|
||||
void QbsProject::updateCppCompilerCallData()
|
||||
{
|
||||
OpTimer optimer("updateCppCompilerCallData");
|
||||
CppTools::CppModelManager *modelManager = CppTools::CppModelManager::instance();
|
||||
QTC_ASSERT(m_cppCodeModelProjectInfo == modelManager->projectInfo(this), return);
|
||||
|
||||
CppTools::ProjectInfo::CompilerCallData data;
|
||||
foreach (const qbs::ProductData &product, m_projectData.allProducts()) {
|
||||
if (!product.isEnabled())
|
||||
continue;
|
||||
|
||||
foreach (const qbs::GroupData &group, product.groups()) {
|
||||
if (!group.isEnabled())
|
||||
continue;
|
||||
|
||||
CppTools::ProjectInfo::CompilerCallGroup compilerCallGroup;
|
||||
compilerCallGroup.groupId = groupLocationToCallGroupId(group.location());
|
||||
|
||||
foreach (const qbs::ArtifactData &file, group.allSourceArtifacts()) {
|
||||
const QString &filePath = file.filePath();
|
||||
if (!CppTools::ProjectFile::isSource(cppFileType(file)))
|
||||
continue;
|
||||
|
||||
qbs::ErrorInfo errorInfo;
|
||||
const qbs::RuleCommandList ruleCommands = m_qbsProject.ruleCommands(product,
|
||||
filePath, QLatin1String("obj"), &errorInfo);
|
||||
if (errorInfo.hasError())
|
||||
continue;
|
||||
|
||||
QList<QStringList> calls;
|
||||
foreach (const qbs::RuleCommand &ruleCommand, ruleCommands) {
|
||||
if (ruleCommand.type() == qbs::RuleCommand::ProcessCommandType)
|
||||
calls << ruleCommand.arguments();
|
||||
}
|
||||
|
||||
if (!calls.isEmpty())
|
||||
compilerCallGroup.callsPerSourceFile.insert(filePath, calls);
|
||||
}
|
||||
|
||||
if (!compilerCallGroup.callsPerSourceFile.isEmpty())
|
||||
data.append(compilerCallGroup);
|
||||
}
|
||||
}
|
||||
|
||||
m_cppCodeModelProjectInfo = modelManager->updateCompilerCallDataForProject(this, data);
|
||||
}
|
||||
|
||||
void QbsProject::updateQmlJsCodeModel()
|
||||
{
|
||||
OpTimer optimer("updateQmlJsCodeModel");
|
||||
|
||||
Reference in New Issue
Block a user