forked from qt-creator/qt-creator
ClangTools: Remove clang executable settings
We use custom clang executable and it does not make sense anymore to give a choice of changing it. Change-Id: Icf86042ac3fcd08c320ef2bbdaabef1102b023b5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -528,7 +528,7 @@ void CompilerOptionsBuilder::addClangIncludeFolder()
|
||||
{
|
||||
QTC_CHECK(!m_clangVersion.isEmpty());
|
||||
add(SYSTEM_INCLUDE_PREFIX);
|
||||
add(clangIncludeDirectory());
|
||||
add(clangIncludeDirectory(m_clangVersion, m_clangResourceDirectory));
|
||||
}
|
||||
|
||||
void CompilerOptionsBuilder::addProjectConfigFileInclude()
|
||||
@@ -548,14 +548,23 @@ static QString creatorLibexecPath()
|
||||
#endif
|
||||
}
|
||||
|
||||
QString CompilerOptionsBuilder::clangIncludeDirectory() const
|
||||
QString clangIncludeDirectory(const QString &clangVersion, const QString &clangResourceDirectory)
|
||||
{
|
||||
QDir dir(creatorLibexecPath() + "/clang" + clangIncludePath(m_clangVersion));
|
||||
QDir dir(creatorLibexecPath() + "/clang" + clangIncludePath(clangVersion));
|
||||
if (!dir.exists() || !QFileInfo(dir, "stdint.h").exists())
|
||||
dir = QDir(m_clangResourceDirectory);
|
||||
dir = QDir(clangResourceDirectory);
|
||||
return QDir::toNativeSeparators(dir.canonicalPath());
|
||||
}
|
||||
|
||||
QString clangExecutable(const QString &clangBinDirectory)
|
||||
{
|
||||
const QString hostExeSuffix(QTC_HOST_EXE_SUFFIX);
|
||||
QDir executable(creatorLibexecPath() + "/clang/bin/clang" + hostExeSuffix);
|
||||
if (!executable.exists())
|
||||
executable = QDir(clangBinDirectory + "/clang" + hostExeSuffix);
|
||||
return QDir::toNativeSeparators(executable.canonicalPath());
|
||||
}
|
||||
|
||||
void CompilerOptionsBuilder::undefineClangVersionMacrosForMsvc()
|
||||
{
|
||||
if (m_projectPart.toolchainType == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) {
|
||||
|
||||
Reference in New Issue
Block a user