forked from qt-creator/qt-creator
ProjectExplorer: Simplify detection of "built-in" clang
This is also the only case that triggered the short code path in findCompilerCandidates(). Change-Id: Id8a88a275655526733e80c30250800db66ac6653 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1344,9 +1344,8 @@ Toolchains GccToolChainFactory::autoDetect(const ToolchainDetector &detector_) c
|
|||||||
|
|
||||||
const FilePath compilerPath = Core::ICore::clangExecutable(CLANG_BINDIR);
|
const FilePath compilerPath = Core::ICore::clangExecutable(CLANG_BINDIR);
|
||||||
if (!compilerPath.isEmpty()) {
|
if (!compilerPath.isEmpty()) {
|
||||||
const FilePath clang = compilerPath.parentDir().pathAppended("clang").withExecutableSuffix();
|
|
||||||
tcs.append(
|
tcs.append(
|
||||||
autoDetectToolchains(findCompilerCandidates(detector, clang.toString(), false),
|
autoDetectToolchains({compilerPath},
|
||||||
Constants::C_LANGUAGE_ID,
|
Constants::C_LANGUAGE_ID,
|
||||||
Constants::CLANG_TOOLCHAIN_TYPEID,
|
Constants::CLANG_TOOLCHAIN_TYPEID,
|
||||||
ToolchainDetector(known, detector.device, detector.searchPaths),
|
ToolchainDetector(known, detector.device, detector.searchPaths),
|
||||||
@@ -1454,10 +1453,6 @@ static FilePaths findCompilerCandidates(const ToolchainDetector &detector,
|
|||||||
const QString &compilerName,
|
const QString &compilerName,
|
||||||
bool detectVariants)
|
bool detectVariants)
|
||||||
{
|
{
|
||||||
const QFileInfo fi(compilerName);
|
|
||||||
if (detector.device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE && fi.isAbsolute() && fi.isFile())
|
|
||||||
return {FilePath::fromString(compilerName)};
|
|
||||||
|
|
||||||
QStringList nameFilters(compilerName);
|
QStringList nameFilters(compilerName);
|
||||||
if (detectVariants) {
|
if (detectVariants) {
|
||||||
nameFilters
|
nameFilters
|
||||||
|
|||||||
Reference in New Issue
Block a user