summaryrefslogtreecommitdiff
path: root/src/app/qbs-setup-toolchains
Commit message (Collapse)AuthorAgeFilesLines
* Add support for other platforms supported by Digital MarsDenis Shienkov2022-02-171-97/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the following target platforms: * DOS - both 32/16 bit. * Windows - 16 bit. Also, more specifically, the target is controlled by the `cpp.extenderName` property, which is the DOS extender to use. The Digital Mars support the following DOS extenders: * Rational 16 bit DOS Extender * ZPM 16 bit DOS Extender * DOSX 32 bit DOS Extender * Pharlap 32 bit DOS Extender which have the following names `dosr`, `dosz`, `dosx`, `dosp`. The user can set any of the desired values in the `cpp.extenderName` property (also this property can be empty that means no any extender is used). Right now the `qbs-setup-toolchain` utility creates all possible supported profiles with the required pre-configured properties: Profile 'dmc-8_57_0-windows-x86' created for 'C:/dm/bin/dmc.exe'. Profile 'dmc-8_57_0-windows-x86_16' created for 'C:/dm/bin/dmc.exe'. Profile 'dmc-8_57_0-dosx-x86' created for 'C:/dm/bin/dmc.exe'. Profile 'dmc-8_57_0-dosp-x86' created for 'C:/dm/bin/dmc.exe'. Profile 'dmc-8_57_0-dosr-x86_16' created for 'C:/dm/bin/dmc.exe'. Profile 'dmc-8_57_0-dosz-x86_16' created for 'C:/dm/bin/dmc.exe'. Profile 'dmc-8_57_0-dos-x86_16' created for 'C:/dm/bin/dmc.exe'. Compiling with DOS extenders requires additional external utilities and libraries (depending on the extender type). Some of them are no longer available at the moment, so the tests in CI are only done for the `dmc-windows-x86`, `dmc-windows-x86_16`, and `dmc-dos-x86_16` profiles. Change-Id: I221d2995900c63605c8552b825bf0c4d55171f5c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add support for other platforms supported by Open WatcomDenis Shienkov2022-02-091-46/+101
| | | | | | | | | | | | | This patch adds support for the following target platforms: * DOS - both 32/16 bit. * OS/2 - both 32/16 bit. * Windows - 16 bit. Also all these platforms covered in CI tests. Change-Id: Ie75d9203c50f4d61546b19328992ff0e107d9942 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not use std::string in HostOsInfoIvan Komissarov2022-02-042-7/+4
| | | | | | | | We are not going away from Qt and converting QString to std::strgin and vice versa does not make any sense. Change-Id: I99c0067a4738566728c503fe39f0d0a945d4e977 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Long live Open Watcom toolchainDenis Shienkov2022-02-047-2/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds basic support for the Open Watcom toolchain. This patch uses the `owcc` compiler (supplied with the toolchain), which is a wrapper that supports the POSIX standard. Reason is that the native OW compiler and linker has a limitations in the command line arguments (e.g. they have wrong quotes handling and so on). This patch supports both the latest official version v1.9 and also its fork v2.0. Also added the CI autotests for the version v2.0 for the Windows host. These autotests only perform a limited number of tests (only the bare-metal tests) due to the following toolchain limitations: * The toolchain does not have STL support (there seems to be some kind of the partial support in the form of separate legacy STL ports). * The toolchain support something compatible with the C++98 standard. * The toolchain does not support the shared libraries on Linux hosts. These limitations make it impossible or unjustified to reuse most of the available tests (it requires a lot of work). There was also an attempt to set up CI for tests on Linux host, but for some reason the toolchain installer crashes on CI (although it works fine on a local PC with Ubuntu). Change-Id: Iecf76f51f0b09d31a89683f786b9cd7a825f235e Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Use std::transform where it is possibleDenis Shienkov2022-01-277-29/+19
| | | | | | | ... to unify and simplify a code. Change-Id: Ia493c5f428c1da4df3c8623e448be8ac72fd4f44 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix Clang-Tidy & Clazy 'llvm-else-after-return' warningsDenis Shienkov2021-11-222-5/+5
| | | | | Change-Id: I16649525d797c980c0ba1357b3671b683c4fde25 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix Clang-Tidy & Clazy 'clazy-qstring-arg' warningsDenis Shienkov2021-11-152-3/+2
| | | | | | | | This patch fixes the "Use multi-arg instead [clazy-qstring-arg]" warnings. Change-Id: I205c94d33574b6f7af486b3654dd2d8591746f6c Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Remove `import qbs` from all project filesDenis Shienkov2021-08-041-2/+0
| | | | | | | | | | | | | | ... because we don't need in this inclusion at all. But for some cases it is impossible to remove that inclusions (and even to move on next lines) because then the some tests are failed by unknown reason. For those tests were added the following comments on the inclusion lines: `// FIXME: Don't remove this import because then the test fails!` Change-Id: I9153fd0e38b94af08168e499ee46a23889ee4d73 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Long live Digital Mars toolchainDenis Shienkov2021-07-277-0/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an experimental support for the Digital Mars C/C++ compiler for Windows: * https://www.digitalmars.com/ This compiler is only distributed for Windows host platform, but allows to create the binaries for Win32, Win16, DOS32 and DOS targets. This patch implements only the Win32 targets and has the following limitations: * Support for precompiled headers is not implemented yet (but which is supported by the compiler). * There is no support for the CI autotests due to the fact that the compiler has the following restrictions: - it needs a separate masm386 assembler. - it needs a special format of DLL library sources (required the DLL main function). - it needs the `kernel32.lib` to be always explicitly linked. - and, maybe other unexpected stuff. The following features are currently supported: * Compiling a source files in the C or the C++ mode. * Compiling the source resource (RC) files. * Creation of an applications (both console and GUI). * Creation of an dynamic (DLL) libraries with its import files. * Creation of a static libraries. Task-number: QBS-1598 Change-Id: I5a6ac05a7e7513a1c6d2403db037c309b0f12b90 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Long live COSMIC toolchain for COLDFIRE architectureDenis Shienkov2021-05-311-2/+5
| | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Also the COSMIC toolchain has been added to the Github CI. Fixes: QBS-1648 Change-Id: I39dfeef1c5696e69bed8969890cf4f8fdb3c2741 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Long live COSMIC toolchain for HCS12 architectureDenis Shienkov2021-05-301-1/+3
| | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Also the COSMIC toolchain has been added to the Github CI. Fixes: QBS-1640 Change-Id: I7ab0c8099437fce962632ff87177e37fd04f82d2 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Long live COSMIC toolchain for HCS08 architectureDenis Shienkov2021-05-291-1/+4
| | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Also the COSMIC toolchain has been added to the Github CI. Fixes: QBS-1641 Change-Id: I755fcd3b2a89d0d40fda8b7f9da3d72ee1918df5 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Long live COSMIC toolchain for STM8 architectureDenis Shienkov2021-05-281-1/+3
| | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Also the COSMIC toolchain has been added to the Github CI. Fixes: QBS-1639 Change-Id: Iffba0bc550c5d168fb453c7a325b2c9be06d4195 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Long live COSMIC toolchain for STM32 ARM architectureDenis Shienkov2021-05-286-0/+244
| | | | | | | | | | | | | | | | | | This patch adds support for Cosmic Software compiler for the bare metal platforms: * https://www.cosmicsoftware.com/download.php Note that this compiler only works on Windows host platforms. Right now this patch implements support for ARM architecture for STM32 microcontrollers. But in the future it is simple to extend it and for other architectures (e.g. for STM8, HC08 and so on). Also the COSMIC toolchain has been added to the Github CI. Change-Id: Iabdfd61cc427155117730db46e067004ceb07102 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* msvc: Pass -vcvars_ver to vcvarsall.bat when detecting environmentIvan Komissarov2021-04-231-7/+14
| | | | | | | | | This is required to properly support multiple MSVC toolchains (also now supported). Fixes: QBS-1498 Change-Id: I1274379496d47ebf7842eaed05f498b7af111b5b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix detecting MSVC via Probe when multiple versions are presentIvan Komissarov2021-04-191-0/+6
| | | | | | | | | | | | | | | Previously, Qbs iterated over different versions in the ascending order. During the setup-toolchains this means that the newest one will be written in the settings as only the last one is actually written. When running ClBinaryProbe, the first one (i.e. the oldest was picked up) which did not work well with vcvarsall (without -vcvars_ver parameter, it uses the newest one). So, pick up the newest compiler both when running setup-toolchains and when detecting via Probe. Task-number: QBS-1498 Change-Id: Ib1b433ca7e17747dee986ba383a3c01ee91851fb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Fix detection of GCC ARM toolchain installers on WindowsDenis Shienkov2021-03-021-20/+18
| | | | | | | | | | | | | | | | | | | ... provided by ARM group. Previously, we detected the installed GCC toolchain through the `Uninstall` group in the Windows registry. Where we have enumerated all sub-groups in this group, and searched for a matching for to the `GNU Tools for ARM Embedded Processors` token. But the problem is that in newer versions of the installer, the name of this group has been changed. Moreover, that method is slow because it enumerates all the entries in the group, where these entries can be a lot. Alternatively, we can search for installed toolchains using the `HKLM/SOFTWARE/ARM` path that is constant, contain only the installed toolchains, and present on all versions of installers. Change-Id: If3dc280d03a9c6e25113263309822599f0010d9b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Fix detection of IAR toolchains if version contains build numberDenis Shienkov2021-02-271-1/+1
| | | | | | | | | | We need to allow the build number in the Version::fromString(), otherwise it returns `unknown` version if a version ends with the build number (i.e. when the version string contains the four parts <major>.<minor>.<path>.<build>). Change-Id: Ic295d53d7a68a043ce1461cbe3c84c9502407dc2 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Fix detection for Keil toolchainsDenis Shienkov2021-02-161-82/+28
| | | | | | | | | | | | | | | | | | | Previous implementation does not work if qbs is compiled with 64-bit compiler. The reason is the wrong path in the registry, because it differs for 32/64 bit applications. Besides, the search in the registry was difficult, it was done through the `Uninstall` section, with the parsing of the `tools.ini` file. But we can use an alternative search algorithm using the `HKLM/SOFTWARE` path instead, that simplifies the algorithm. This patch tested with the Qbs compiled with both 32/64 bit compilers. Change-Id: I87e9f62966482ba840b0aa92d4600be29b296384 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Add support for HCS08 architectures to SDCC toolchainDenis Shienkov2021-02-021-14/+15
| | | | | | | | | | This patch adds the HCS08 architectures, provided by Freescale Semiconductor: * https://en.wikipedia.org/wiki/Motorola_S08 Change-Id: I0a08c6433041eb8a00cb3705c5e65857188f4830 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Add support for HCS08 architectures to IAR toolchainDenis Shienkov2021-01-261-2/+6
| | | | | | | | | | This patch adds the HCS08 architectures, provided by Freescale Semiconductor: * https://en.wikipedia.org/wiki/Motorola_S08 Change-Id: Idd668e30bfeb69e588b93b15131e741924b66f40 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Add support for HCS12 architectures to IAR toolchainDenis Shienkov2021-01-211-2/+7
| | | | | | | | | | This patch adds the HCS12 architectures, provided by Freescale Semiconductor: * https://en.wikipedia.org/wiki/Motorola_68HC12 Change-Id: I9083bac9997e0dec50e0392040ce63beaa8a8f05 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Merge branch '1.18'Ivan Komissarov2020-12-181-3/+3
|\ | | | | | | Change-Id: I37c359289dcd957fbc964a35fab381a047f7d04a
| * Reorder toolchain-check to enable creating of clang-cl profileKai Dohmen2020-12-171-3/+3
| | | | | | | | | | | | | | | | | | Since a clang-cl toolchain type will contain "msvc" and "clang-cl" the "clang-cl" branch would never be reached because the "msvc" branch will always be executed. Change-Id: I0a28d9044371b5242a1ad83c828b45915ed0626c Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Fix some Qt 6 build errorsChristian Kandeler2020-11-252-7/+9
| | | | | | | | | | Change-Id: I80dccfacb749ecfc8bfb8000bdc26c684f2afa52 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | qt6: replace some QStringRefs with QStringViewsIvan Komissarov2020-11-091-2/+2
| | | | | | | | | | | | | | | | | | QStringRef does not exist anymore. Qml parser is not ported yet. Change-Id: Ifb99a529b69c0085363031e852ffd7576f1d93be Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | qt6: do not forward-declare QStringListIvan Komissarov2020-11-041-5/+2
|/ | | | | | | It is a typedef to QList<QString> now, not a separate class Change-Id: I2f84d11f09b8c0db64f25bd0682bdc684b64018e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Improve Xcode auto-detectionIvan Komissarov2020-08-311-3/+4
| | | | | | | | This allows to set meaningful names for Xcodes with '.' in it's name, e.g. for Xcode-1.2.3.app Qbs will create xcode-1_2_3 profile. Change-Id: I9ca30eefd28454c4f8e4629c297618e0d550225e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* cmake: rename qbslogging -> qbsconsoleloggerIvan Komissarov2020-08-201-1/+1
| | | | | | | ...to match the Qbs build Change-Id: Ib17d9625bf06d2eed69f51cc0e6e6cbe7ba99085 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* cmake: Fix target namesIvan Komissarov2020-08-201-1/+1
| | | | | | | | | | It should be 'qbscore', not 'corelib'. Same for the static logging library. This amends b67b08f1c2c. Change-Id: I3b79ce75168360f8708b143471f0b4c223b2f5fd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Initial CMake portIvan Komissarov2020-08-171-0/+26
| | | | | | | | | | | | | | | | | | | This change allows to build Qbs using CMake build tool Tested platforms - Linux (gcc) - macOS (clang) - Windows (msvc2017) Missing features (compared to Qbs build) - Documentation build - Bundled QtScript support - Static build - .pc file for qbscore - qbs module for qbscore Change-Id: I09b5dadd6723d5a47e5ef2a9a38d3300488718f2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix MinGW buildChristian Stenger2020-08-061-1/+6
| | | | | Change-Id: I9894098b05004bb99273e091e3d1821f88d7c4af Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* xcode: add 'macosx-arm64' profile to the list of auto-created profilesIvan Komissarov2020-08-031-0/+2
| | | | | | | | There is no easy way to get xcode version from the c++ code, so add arm64 macos for all xcodes Change-Id: I4a8f6bff8ef5e067689d03a85917cdf0cb601ffe Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix Qt 5.15 deprecation warningsChristian Kandeler2020-06-161-1/+2
| | | | | Change-Id: I1d6968de823c43e42ca53eb68972ba5e69dc29ed Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Fix '-Wclazy-range-loop' warningsIvan Komissarov2020-06-081-1/+1
| | | | | | | The warning says 'c++11 range-loop might detach Qt container' Change-Id: I6b6a91d6b3298702246da94f05d21623d5f13faa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Auto-detect IAR toolchain for National Semiconductor CR16 ↵Denis Shienkov2020-05-251-2/+6
| | | | | | | | architecture Change-Id: I9b324380ed5f437c1a1cd43bab22a61223ffd18c Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Auto-detect IAR toolchain for Renesas M16C/R8C architectureDenis Shienkov2020-05-251-2/+7
| | | | | | Change-Id: I3f5822316d328e8861e54d43994de405c591c0b3 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Auto-detect IAR toolchain for Renesas R32C architectureDenis Shienkov2020-05-251-2/+6
| | | | | | Change-Id: I218136517821325b69af5893589b028570bc22c9 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Auto-detect IAR toolchain for Renesas M32C architectureDenis Shienkov2020-05-191-2/+7
| | | | | | Change-Id: I1c7deb28a34c5259b9b8f5c55cd84696ba68204b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Auto-detect IAR toolchain for ColdFire (aka M68K) architectureDenis Shienkov2020-05-181-2/+6
| | | | | | Change-Id: Iad69544737cbca42d69cddaa182bf3aba97a770f Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Auto-detect IAR toolchain for RISC-V architectureDenis Shienkov2020-05-141-2/+7
| | | | | | Change-Id: I659d1fbfb11d325d6ff62b0dda8f429d4249f794 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Use forward slashes in IAR EW probe of qbs-setup-toolchainsDenis Shienkov2020-05-141-12/+12
| | | | | | Change-Id: If222254e27fe6e249f8f3e0cad5a48238d9440d9 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Auto-detect IAR toolchain for Renesas SH architectureDenis Shienkov2020-05-141-2/+6
| | | | | | Change-Id: I9d9f90841c6deb8e02f5583bee4083aae6e11c79 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Auto-detect ARMCLANG compiler supplied in Keil MDKDenis Shienkov2020-05-111-27/+76
| | | | | | | | | In this case the utility creates the default profile starting with the 'keil-llvm-' string. Change-Id: I81dfe94210a9e291d491568e7e0d978021453d4b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Auto-detect IAR toolchain for AVR32 architectureDenis Shienkov2020-05-061-2/+7
| | | | | | Change-Id: Ic5c614504aaebb7d2cb30098e8f408ca9d110150 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge branch '1.16' into masterRichard Weickelt2020-04-152-5/+24
|\ | | | | | | Change-Id: Ie3f341fe18e2ffaf676721748279c6b027590727
| * GCC: fix detection of Mingw prefix in MXEAlberto Mardegan2020-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The toolchain paths in MXE are of the form $MXE_PATH/usr/bin/x86_64-w64-mingw32.shared-g++ so we should not assume that what follows the dot is an extension that needs to be stripped (like QFileInfo::completeBaseName() does). Instead, only strip the know executable extensions. Change-Id: I51040d65e372ef3152ddd9229dd33011661c2b46 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
| * baremetal: Fix detecting older sdcc compilerIvan Komissarov2020-03-231-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | Ubuntu Bionic has slightly older compiler version (3.5.0) which doesn't have macros that are used to detect compiler version. But it has the "__SDCC" macro containing the value "3_5_0". Use that as a fallback. Change-Id: I0bac78b684e64f11d00f8d915f806f7662d99766 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Dump version for C166 compilerDenis Shienkov2020-04-061-1/+62
| | | | | | | | | | | | | | | | ... if this compiler specified in a path. Change-Id: Ie01ea0651291d0ada3f0f8731ccdd054b3d38caf Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | clang-tidy: Fix 'misc-unused-using-decls' warningsIvan Komissarov2020-04-062-3/+0
| | | | | | | | | | | | | | Also, treat those as errors now. Change-Id: I4f883c7c806d778487e37f07481d397466d5f817 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>