aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/baremetal/keiltoolchain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Enhance Process::exitMessage()Christian Kandeler2025-04-171-1/+1
| | | | | | | ... with stderr/stdout data, if requested. Change-Id: Ia4aed9b342144d5358c5a91f4555bccb86b2eb7b Reviewed-by: hjk <[email protected]>
* BareMetal: Replace FilePath::toStringAndrii Semkiv2024-09-201-6/+6
| | | | | | | Replace occurrences of FilePath::toString with more sensible alternatives. Change-Id: If628393e56e512e3a8a3e19a048e190809c69bf7 Reviewed-by: hjk <[email protected]>
* ProjectExplorer: Stop pretending that C and C++ compilers are unrelatedChristian Kandeler2024-08-051-47/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: a) It was ridiculous that when users wanted to manually add a new toolchain, they had to do the entire setup twice. b) It was equally weird that users had to take care to choose matching toolchains when setting up a kit, or indeed that it was even possible to mix random toolchains in the first place. User-visible changes: - The "C" and "C++" categories in the toolchain settings page have been merged into a single "C/C++" category. - When adding a new toolchain, the "C" and "C++" sub-menus are gone. Instead, the toolchain config widget offers two path choosers if the respective toolchain type supports C and C++ compilers. - By default, the C++ compiler file path is derived from the C compiler file path automatically, so the user usually has to enter only the former. - In the kit settings page, the "C" and "C++" toolchain combo boxes have been replaced by a single "C/C++" combo box, relieving the user of the responsibility to choose two matching toolchains. Implementation: The notion that a Toolchain object corresponds to a single compiler is so deeply engrained in the code that it cannot realistically be changed in the short term. We therefore introduce the concept of a "toolchain bundle" as an additional layer that groups matching C and C++ toolchains together. This way, most code dealing with toolchains stays unchanged, and only the presentation layer (i.e. the toolchain and kit settings pages) needed to be rewritten. Once set up in a bundle, toolchains stay implicitly linked together so the matching only needs to be done once. In follow-up patches, we will make use of toolchain bundles in all the places where kits are auto-created, eliminating the risk of mixing incompatible toolchains in a kit. Change-Id: Ie6c5add9963e7c1096268dd77acd624671b2674f Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: hjk <[email protected]>
* CommandLine: Reuse new c'torJarek Kobus2024-05-221-5/+1
| | | | | | Change-Id: Id154881b4f5d8c488e5c1f5e0f843d36bf838759 Reviewed-by: Orgad Shaneh <[email protected]> Reviewed-by: <[email protected]>
* Utils: Fix build with MSVC with C++20Eike Ziller2024-02-281-1/+1
| | | | | | | | | | | | | | | | | Rename process.h back to qtcprocess.h MSVC's "threads" standard header includes <process.h>, and that ends up including our process.h from Utils. There already was a hacky workaround in place for a similar issue with MINGW, but that doesn't work with MSVC because that doesn't have Simply use a name that doesn't conflict. Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: <[email protected]> Reviewed-by: hjk <[email protected]>
* Process: Get rid of setTimeoutS()Jarek Kobus2024-01-221-3/+0
| | | | | | | | Add an extra arg to runBlocking() function instead. Use std::chrono::seconds for timeout. Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e Reviewed-by: Orgad Shaneh <[email protected]>
* All: More ToolChain->Toolchain renamingshjk2024-01-191-4/+4
| | | | | | | | And removal of one unused function declaration. Change-Id: I594e23401d8f247d3be081ce850005574951899d Reviewed-by: <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Some more Toolchain renamingshjk2023-12-141-38/+38
| | | | | | Change-Id: If8bdfd5e49a031a511bc0e062727495a12d2d3bd Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Rename various items in the Toolchain classhjk2023-12-041-1/+1
| | | | | | Change-Id: I544763d3b4d521f6bbed0dc5a767c15c49055a19 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Rename ToolChainManager to ToolchainManagerhjk2023-11-271-3/+3
| | | | | | | Plus the private and some comments. Change-Id: I95d72d77f25cb1c969a1a6148e7186150a697d1f Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Rename ToolChain to Toolchainhjk2023-11-241-11/+11
| | | | | Change-Id: Ibb520f14ff3e2a6147ca5d419b9351c50c141063 Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Rename Tool{C,h}ainFactoryhjk2023-11-241-7/+7
| | | | | | | Also adapt derived classes. Change-Id: Iebf654c974730333c42b6994269ad1a4d5f7f428 Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Rename Tool{C,c}hainConfigWidgethjk2023-11-241-5/+5
| | | | | | | | That's the trend. Change-Id: I24a328f1190200b4499c6a11d9d3df074ce5973d Reviewed-by: <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* BareMetal: Use new setup approach for toolchain factorieshjk2023-11-171-8/+25
| | | | | Change-Id: Ic91ccab925f054d80fbfa8bc018b3e86d207b186 Reviewed-by: Jarek Kobus <[email protected]>
* BareMetal: Simplify a few tests for executable compilerhjk2023-07-211-10/+2
| | | | | Change-Id: I9d85623b09a949be88075b031fa973c218e93e80 Reviewed-by: Jarek Kobus <[email protected]>
* BareMetal: Use aspect for KeilToolChain::m_extraCodeModelFlagshjk2023-07-211-36/+10
| | | | | Change-Id: I847bc9260b645d75eb695e1d0791326e8a2b734e Reviewed-by: Jarek Kobus <[email protected]>
* ProjectExplorer: Change ToolChain::toMap() signaturehjk2023-07-201-4/+3
| | | | | | | | ... to something similar to AspectContainer::toMap() as preparation for later aspectification. Change-Id: Ic60060ad1a7eb1aba58ded01221b016c684db073 Reviewed-by: Jarek Kobus <[email protected]>
* BareMetal: Inline some simple toolchain functionhjk2023-07-201-12/+3
| | | | | Change-Id: I01112a82c1de101e16dfa262413dbac17400d375 Reviewed-by: Jarek Kobus <[email protected]>
* BareMetal: Hide KeilToolChain definitionshjk2023-07-201-6/+64
| | | | | | | Not needed publicly. Change-Id: I40272a26a450a10ada8e5d579dd6a2b5bd3c259a Reviewed-by: Jarek Kobus <[email protected]>
* Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}Jarek Kobus2023-05-041-1/+1
| | | | | | | | Follows QtcProcess -> Process rename. Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919 Reviewed-by: hjk <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* Utils: Rename QtcProcess -> ProcessJarek Kobus2023-05-041-3/+3
| | | | | | | | Task-number: QTCREATORBUG-29102 Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: <[email protected]> Reviewed-by: hjk <[email protected]>
* BareMetal: Adapt to change in FilePathChristian Stenger2023-01-181-2/+2
| | | | | Change-Id: I4766ccd8fc7121af1045d2fc7d2e730da0a9d44b Reviewed-by: hjk <[email protected]>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <[email protected]>
* BareMetal: Convert to Tr::trhjk2022-10-111-14/+12
| | | | | | Change-Id: I7ac423c13d95b33cad332d2ce9fafb4f658980bc Reviewed-by: Alessandro Portale <[email protected]> Reviewed-by: <[email protected]>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <[email protected]>
* ProjectExplorer: Use FilePath for sysrootshjk2022-06-301-2/+2
| | | | | | | | | ... and reduce to the relevant part when passing to cmake. Task-number: QTCREATORBUG-27229 Change-Id: I7cde2ff04530caf439d6707c2c6d15a8e734ae0b Reviewed-by: <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* QtcProcess: Limit the inclusion of qtcprocess.hJarek Kobus2022-03-021-1/+1
| | | | | | | | | | Move the rest of QtcProcess enums to processenums.h. Move ExitCodeInterpreter into processenums.h. Remove superfluous Utils:: prefix. Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80 Reviewed-by: hjk <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* ProjectExplorer: Collect bad baremetal toolchainsChristian Kandeler2022-01-211-1/+5
| | | | | | | | Extends 16ef8b6253. Change-Id: I51d16057b45f21f50453a1d54a8bed7915c4d053 Reviewed-by: hjk <[email protected]> Reviewed-by: <[email protected]>
* ProjectExplorer: Use a struct for toolchain autodetection parametershjk2022-01-181-10/+7
| | | | | | | Also, make some functions const and use an alias for QList<ToolChain *>. Change-Id: I6a1cbcb79bfaa9d252c4b69e00aa93e5d0dabe2f Reviewed-by: Christian Kandeler <[email protected]>
* Utils: FilePathify Environment::{ap,pre}pendOrSetPath etchjk2021-11-101-4/+2
| | | | | Change-Id: Idfa5ec247337570936b0236cab9d3a5669792ca0 Reviewed-by: David Schulz <[email protected]>
* Add convenience functions for creating ProjectExplorer::HeaderPathsChristian Kandeler2021-08-301-2/+2
| | | | | Change-Id: I7b1f63caca6b70ba4ec1b1870b83cbf20aa6564a Reviewed-by: Christian Stenger <[email protected]>
* All: Replace most SynchronousProcess by QtcProcesshjk2021-06-231-3/+3
| | | | | Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42 Reviewed-by: Christian Stenger <[email protected]>
* BareMetal: Don't check QtcProcess exit codehjk2021-06-021-1/+1
| | | | | | | This is already baked into QtcProcess::Result. Change-Id: Ia601c633dd70be375b641208a471792b0b5eceff Reviewed-by: Christian Kandeler <[email protected]>
* Utils: Rename QtcProcess::Result::Finished to FinishedWithSuccesshjk2021-06-021-1/+1
| | | | | | | | | | | | To make clear that this is not just any finish. Also change FinishedError to FinishedWithError, to create symmetry. Also adapt enum member description to reality. Change-Id: I13e05391eb86fdb24e2ae660f14dfddb282e1104 Reviewed-by: Christian Kandeler <[email protected]>
* Utils: Remove CommandLine argument from QtcProcess::run{,Blocking}hjk2021-05-191-6/+6
| | | | | | | | | | | Makes run() more similar to what start() looks like. Also add some asserts to make sure run() and related functions are only called on SyncronousProcesses, as these are currently the only ones where this works. Change-Id: Idee6076c3f40a484db5c17f5bb348698cc83d220 Reviewed-by: Christian Stenger <[email protected]>
* Utils: Simplify QtcProcess::exitMessage() interfacehjk2021-05-171-1/+1
| | | | | | | | | | | This was requiring parameters the process object already knows. This is a slight behavior change in most cases, it now includes always the command line arguments, which previously only happened in gcctoolchain.cpp and iarewtoolchain.cpp. Change-Id: Id25a68c397e2f1d8bf52ab29210e215b1de46c6d Reviewed-by: Christian Kandeler <[email protected]>
* Utils: Make process results accessible through QtcProcess objecthjk2021-05-141-9/+8
| | | | | | | | | | | | | | | | The result is fully stored in the object anyway. Using the extra SynchronousProcessResponse structure only causes copies of the data and complicates access on the user side in a lot of cases. The result bits are now also accessible individually. There's obvious room for follow-up changes on the topic, e.g. ShellCommand::runCommand's parameter list could shrink to just a SynchronousProcess parameter. Change-Id: I45aa7eb23832340be06905929280c012e1217263 Reviewed-by: Christian Kandeler <[email protected]>
* Utils: Move process arguments class out of QtcProcesshjk2021-05-111-5/+5
| | | | | | | | | | | | The main QtcProcess interface is nowadays a CommandLine, with no explicit references left to QtcProcess::Arguments and related static helper functions, so it only clutters the QtcProcess class interface So move these items out of QtcProcess, later potentially to a separate file pair. Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7 Reviewed-by: Christian Stenger <[email protected]>
* Utils: Merge {synchronous,qtc}process.{h,cpp} file pairshjk2021-05-101-1/+0
| | | | | | | | Mechanical to prepare merging the actual classes. Adapting #includes. Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b Reviewed-by: Christian Stenger <[email protected]>
* Utils: Make SynchronousProcess use Utils::Environment for environmentshjk2021-05-051-7/+7
| | | | | | | | Makes the interface more similar to QtcProcess. Change-Id: I58e57d9fdb7c37eb0d2a5c5eef8643d6be97c3cc Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: Orgad Shaneh <[email protected]>
* ProjectExplorer: Pass device to ToolChain::autodetecthjk2021-04-281-1/+3
| | | | | | | | Currently unused, will be useful to detect toolchains in docker containers. Change-Id: I0fd7643969ab02c05839332a436147ffb242635d Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Provide a ToolChain::isValid() base implementationhjk2021-01-061-5/+0
| | | | | | | | | | | 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 <[email protected]>
* Merge remote-tracking branch 'origin/4.14'Eike Ziller2020-11-301-12/+0
|\ | | | | | | | | | | | | Conflicts: src/plugins/projectexplorer/gcctoolchain.cpp Change-Id: I2136ba89d3aa3c4c2a0e7a4f9d8ba9cec32924ce
| * ProjectExplorer: Remove unused virtual Toolchain::builtInHeaderPaths()Christian Kandeler2020-11-301-7/+0
| | | | | | | | | | Change-Id: I684b4b7fba9b74baf0834e7d5a0815673c666112 Reviewed-by: hjk <[email protected]>
| * ProjectExplorer: Remove unused virtual Toolchain::predefinedMacros()Christian Kandeler2020-11-301-5/+0
| | | | | | | | | | Change-Id: I24e515ba1767c72cbf43ae250908f571f0229e9f Reviewed-by: hjk <[email protected]>
* | ProjectExplorer: Consolidate *ToolChain::compilerCommand() implementationshjk2020-11-131-29/+12
| | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | ProjectExplorer: Consolidate *ToolChain::target() implementationshjk2020-11-111-19/+3
|/ | | | | | | | | 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 <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* BareMetal: Remove qualifiers from setting keysOrgad Shaneh2020-10-271-3/+3
| | | | | | | | | | | | They're pure noise, since there should be no conflicts between base and derived classes, and there can't be multiple classes for the same provider. This maintains compatibility when upgrading from earlier versions, but not for downgrades. Change-Id: I02655410172ff170fca4893f7b37c2fb1f316aff Reviewed-by: Denis Shienkov <[email protected]> Reviewed-by: hjk <[email protected]>
* Fix Qt 6 build of ProjectExplorer and targets & build systemsEike Ziller2020-09-211-2/+2
| | | | | | | | | | | | QStringRef is gone. qsizetype vs int. QMultiHash::insertMulti is gone. QXmlStreamWriter writes UTF-8 by default. Task-number: QTCREATORBUG-24098 Change-Id: Id217e40a1f17993a84fc725976e9cb84618b0580 Reviewed-by: hjk <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>