forked from qt-creator/qt-creator
Clang: Fix resource directory path
Effected clang tools in developer builds. Change-Id: I3ecbc38f37fa2a41f3777f402fd7fe5bf5ba7e94 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -185,16 +185,14 @@ private:
|
|||||||
bool m_success = false;
|
bool m_success = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
static AnalyzeUnits toAnalyzeUnits(const FileInfos &fileInfos,
|
static AnalyzeUnits toAnalyzeUnits(const FileInfos &fileInfos)
|
||||||
const QString &clangVersion,
|
|
||||||
const QString &clangResourceDirectory)
|
|
||||||
{
|
{
|
||||||
AnalyzeUnits unitsToAnalyze;
|
AnalyzeUnits unitsToAnalyze;
|
||||||
const CompilerOptionsBuilder::PchUsage pchUsage = CppTools::getPchUsage();
|
const CompilerOptionsBuilder::PchUsage pchUsage = CppTools::getPchUsage();
|
||||||
for (const FileInfo &fileInfo : fileInfos) {
|
for (const FileInfo &fileInfo : fileInfos) {
|
||||||
CompilerOptionsBuilder optionsBuilder(*fileInfo.projectPart,
|
CompilerOptionsBuilder optionsBuilder(*fileInfo.projectPart,
|
||||||
clangVersion,
|
CLANG_VERSION,
|
||||||
clangResourceDirectory);
|
CLANG_RESOURCE_DIR);
|
||||||
QStringList arguments = extraClangToolsPrependOptions();
|
QStringList arguments = extraClangToolsPrependOptions();
|
||||||
arguments.append(optionsBuilder.build(fileInfo.kind, pchUsage));
|
arguments.append(optionsBuilder.build(fileInfo.kind, pchUsage));
|
||||||
arguments.append(extraClangToolsAppendOptions());
|
arguments.append(extraClangToolsAppendOptions());
|
||||||
@@ -204,12 +202,11 @@ static AnalyzeUnits toAnalyzeUnits(const FileInfos &fileInfos,
|
|||||||
return unitsToAnalyze;
|
return unitsToAnalyze;
|
||||||
}
|
}
|
||||||
|
|
||||||
AnalyzeUnits ClangToolRunControl::unitsToAnalyze(const QString &clangVersion)
|
AnalyzeUnits ClangToolRunControl::unitsToAnalyze()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_projectInfo.isValid(), return AnalyzeUnits());
|
QTC_ASSERT(m_projectInfo.isValid(), return AnalyzeUnits());
|
||||||
|
|
||||||
const QString clangResourceDirectory = clangIncludeDirectory(m_clangExecutable, clangVersion);
|
return toAnalyzeUnits(m_fileInfos);
|
||||||
return toAnalyzeUnits(m_fileInfos, clangVersion, clangResourceDirectory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDebug operator<<(QDebug debug, const Utils::Environment &environment)
|
static QDebug operator<<(QDebug debug, const Utils::Environment &environment)
|
||||||
@@ -311,7 +308,7 @@ void ClangToolRunControl::start()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Collect files
|
// Collect files
|
||||||
const AnalyzeUnits unitsToProcess = unitsToAnalyze(CLANG_VERSION);
|
const AnalyzeUnits unitsToProcess = unitsToAnalyze();
|
||||||
qCDebug(LOG) << "Files to process:" << unitsToProcess;
|
qCDebug(LOG) << "Files to process:" << unitsToProcess;
|
||||||
m_unitsToProcess = unitsToProcess;
|
m_unitsToProcess = unitsToProcess;
|
||||||
m_initialFilesToProcessSize = m_unitsToProcess.count();
|
m_initialFilesToProcessSize = m_unitsToProcess.count();
|
||||||
|
@@ -77,7 +77,7 @@ private:
|
|||||||
void start() final;
|
void start() final;
|
||||||
void stop() final;
|
void stop() final;
|
||||||
|
|
||||||
AnalyzeUnits unitsToAnalyze(const QString &clangVersion);
|
AnalyzeUnits unitsToAnalyze();
|
||||||
void analyzeNextFile();
|
void analyzeNextFile();
|
||||||
|
|
||||||
void handleFinished();
|
void handleFinished();
|
||||||
|
Reference in New Issue
Block a user