forked from qt-creator/qt-creator
bare-metal: Don't create C++ toolchain for auto-detected KEIL C51 compiler
... because this compiler support only the C language. Change-Id: Id6da8da01eb8feff75acf29174fba4de10e0d3a0 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -512,7 +512,14 @@ QList<ToolChain *> KeilToolchainFactory::autoDetectToolchain(
|
|||||||
const Macros macros = dumpPredefinedMacros(candidate.compilerPath, env.toStringList());
|
const Macros macros = dumpPredefinedMacros(candidate.compilerPath, env.toStringList());
|
||||||
if (macros.isEmpty())
|
if (macros.isEmpty())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
const Abi abi = guessAbi(macros);
|
const Abi abi = guessAbi(macros);
|
||||||
|
const Abi::Architecture arch = abi.architecture();
|
||||||
|
if (arch == Abi::Architecture::Mcs51Architecture
|
||||||
|
&& language == ProjectExplorer::Constants::CXX_LANGUAGE_ID) {
|
||||||
|
// KEIL C51 compiler does not support C++ language.
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
const auto tc = new KeilToolchain(ToolChain::AutoDetection);
|
const auto tc = new KeilToolchain(ToolChain::AutoDetection);
|
||||||
tc->setLanguage(language);
|
tc->setLanguage(language);
|
||||||
|
Reference in New Issue
Block a user