ProjectExplorer: Give Xcode clang higher priority than "bare" clang

If Xcode is present, we want its toolchain in the default kit, rather
than a generic compiler from /usr/bin.

Change-Id: If5d1dc02b6abcfff580162a19f07706d58681b7e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Kandeler
2022-08-17 11:14:11 +02:00
parent 2b64232eba
commit f49f9b43da
5 changed files with 45 additions and 14 deletions

View File

@@ -587,6 +587,7 @@ Toolchains IosToolChainFactory::autoDetect(const ToolchainDetector &detector) co
auto createOrAdd = [&](ClangToolChain *toolChain, Id l) {
if (!toolChain) {
toolChain = new ClangToolChain;
toolChain->setPriority(ToolChain::PriorityHigh);
toolChain->setDetection(ToolChain::AutoDetection);
toolChain->setLanguage(l);
toolChain->setDisplayName(target.name);