Currently unused, will be useful to detect toolchains in docker
containers.
Change-Id: I0fd7643969ab02c05839332a436147ffb242635d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It checks for an executable compilerCommand(). This was used in Gcc,
Clang and Nim before. MSVC still overrides with a different test.
The formerly unconditional 'return true' for Keil/IAR/Sdcc uses that
check now, too.
Change-Id: I433a5ac6784277dc77129b2671c28af6913327a7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
All ToolChains had an compiler command member one way or the other, so have
one in the base class and drop all others.
ClangClToolChain is quirky insofar as it diverts the compilerCommand()
to the additional m_clangPath member. This is left for a later patch.
Change-Id: Ic8b5da17a4b7050966d0c37573edb0706fac2ecf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
All ToolChains had an Abi member one way or the other, so have
one in the base class and drop all others.
Change-Id: Ic4ed47b77f51c2c53d5692c66e6103c6bb23277e
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
As data point: Ubuntu 18.04 has Qt Creator 4.5.
Change-Id: I2794197e511666b3931fb8efc2669a574e6f1ac9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
There's no point in keeping ~2 items in a set and convert that
to a list every now and then.
Change-Id: I214b1049fb458e3d159478c47f55b97aacaac75a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... and use it in ToolChainFactory::detectForImport() overloads.
Change-Id: I107b9d5e185580b8fbef4c6e0233fdae5d253506
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... to detectForImport(). The overloads have different purposes,
sharing the name makes reasoning about them hard.
Change-Id: I57bfbbc1aa06ef85251e39c404bdbe5584a2ea41
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This is meant to be the only function directly creating tool chain
objects in the long run (and also the only one setting ids, removing
the need to spell them out in the individual constructors).
Change-Id: Idef242612a5a3f7012628b4080a03d6ee70e5ba0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
And inline it in AndroidConfigurations, which is the only place that
made use of suggestedDebugger()
Change-Id: I87f135b5d115adb7e46b0f009c5853221e9a3daa
Reviewed-by: hjk <hjk@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Even if this is part of a directory name it is naturally closer to a
"string" id than a file path.
Change-Id: If66f930526744379ce86e2b18bd9eac7fabfe773
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... in all but one case (ClangCL, which is special).
Change-Id: I6429f2f37b18524c29b6be78801ea0e5517cad4c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It's unclear why auto-detected toolchains should be treated differently
after a restart of Qt Creator.
Change-Id: I0ba3787adccfb070ce0b36135e8fe94d6e4e4628
Reviewed-by: hjk <hjk@qt.io>
This was used wildly inconsistently. Use a setter instead in
circumstances where the context is reasonably clear.
The assumption is that this will always be done at some time in all
code paths.
Use a new 'Uninitialized' value to avoid triggering the first update.
Change-Id: I82c38cb9da3ccdbd8fbae8beefcbfa0e559ff794
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
All except Nim and the test tool chain were referencing the cache,
so move it to the base.
This removes also toolChainUpdated() overloads, including the
MsvcToolChain one that missed to call the base implementation
and the ClangClToolChain one that worked around that.
Change-Id: I8a99734aa3c697c635809a3648673a10ca14a2d8
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Clang toolchain in gcc mode requires mingw sysroot and target
in order to be used properly on Windows.
Requires Qt >= 5.12 to work properly (it has the required mkspec).
Change-Id: I4e5a734c699ac98740c0d50560aa7b69751ae58c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We want to use them in the backend processes too so it's nice to share them
in Utils. A concrete size was added too because they should be serialized.
Change-Id: Id5eb8f46643d5159f034fc9559f68a08d7e5847a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
For the indexing we need all tool chain macros. Originally it was a fix
because the C++ version of the project part and __cplusplus could be
different but now they should be the same. They will be now removed in the
compiler options builder.
Change-Id: I7ae8721a29632473e76ecedb411a6c9001e5e199
Task-number: QTCREATORBUG-21265
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
...to fix running into unknown __cplusplus values from compilers with
incomplete language support.
This amends
Toolchains: Detect unspecified language version
commit 5900766ecb
Change-Id: I88cca71ae66cc5d49b644e88658aaa5806862fba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
... between CppTools::ProjectPart and ProjectExplorer::ToolChain.
Change-Id: I8b448747e454adbed77547460383b8515462cc81
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We checked the command line from the project manager for "-std=X" and
friends to figure out the language version to use. However, if such a
flag was not provided, we assumed the latest version we support. This
could conflict with the actual version of the compiler and its
predefined macros.
Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the
predefined macros of the toolchain. The MSVC compiler is an exception to
this, as it does not seem to properly set the value - check for
_MSVC_LANG if possible, otherwise simply assume some versions as before.
While at it, add also support for C17/C18 and the upcoming C++2a.
Task-number: QTCREATORBUG-20884
Task-number: QTCREATORBUG-21188
Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Use unique_ptr for all *Private classes, except for those
in singletons.
Change-Id: Ib56c31ddedc6e9cf321f15de1f1e697a27ad4089
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
... by additionally keeping local (currently non-owning) pools per
"interesting" type.
Current situation:
- The global object pool does not scale well for looking up
objects, as iteration plus qobject_cast typically iterates
over all pooled objects.
- User code that can use typed results from the object
pool need to have access to the full type definition anyway,
i.e. depend on the plugin of the target class anyway.
The patch here solves the scaling problem is to have local
type-specific pools to which objects register in their
constructors and deregister in their destructors.
This patch here does *not* change the ownership model of the
pooled objects, however, it opens the possibility to change
the ownership model per type (e.g. by not putting things into
the global pool at all anymore and make the local pool 'owning')
and the intent is to handle that in later patchs.
Even without the follow-up patches this here is a performance
improvement for the cases that access the local pools instead
the global one, i.e. "practically all".
Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This avoids turning all toolchains into C++ when going from Qt Creator 4.3
to Qt Creator 4.2 and back.
Change-Id: I607606f76d958c634ab27cb6db3bf35a1236b2b6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This is necessary to auto-detect the toolchain e.g. found in an existing
cmake or qbs build directory.
Change-Id: I1405d1337855d55fa0145e8b50a5864ff0d4231b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Language ids are exposed via the MacroExpander to the user. So remove the
prefix and only leave the bare essential (C and Cxx), so that
%{Compiler::Executable:Cxx} continues to work.
Add code to transition kits and toolchains to the new Ids.
Change-Id: I012e5fd405b09032418c90d2517aede21cfa1b47
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Otherwise C/C++ with the same ABI are detected as duplicates.
Change-Id: I99090b4cc776047b1ecb958242d0b4f5ecec5f0a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
"C++" might end up clashing with Orgad's work to make variable substitution
more powerful. Use a pure-ASCII-string name (Cxx) instead.
No conversion code since the impact can't be big so far, considering how
new the code is.
Change-Id: Iab1c91cd89d6c11dfaad80472a312e619abb6d97
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>