aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
Commit message (Collapse)AuthorAgeFilesLines
* Fix static buildChristian Kandeler2019-10-102-0/+19
| | | | | | | | Make sure we link in the generator plugins. Fixes: QBS-1491 Change-Id: I8c48a73f972c4089cfc8c097a67e2945837e9ed4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* JSON API: Force binary mode for stdout on WindowsChristian Kandeler2019-09-301-0/+15
| | | | | | | | Otherwise, the line feed character will get expanded to \r\n. Change-Id: I90e83d80625c59978986541fb2d04f49e75afaf0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Merge 1.14 into masterChristian Kandeler2019-09-262-18/+56
|\ | | | | | | Change-Id: Ie432987ee2d3ccaa6e881b1b01f142185eddabd8
| * baremetal: Fix auto detection of SDCC toolchain on WindowsDenis Shienkov2019-09-232-18/+49
| | | | | | | | | | | | | | | | | | | | | | | | The SDCC toolchain package can be provided as 32-bit or as 64-bit installer. If the SDCC 64-bit package will be installed on the 32-bit Windows, then it will not be found in the system registry, because we use the QSettings::NativeFormat. So, we need to check the data for the 32-bit and 64-bit registry sequentially. Change-Id: I15981f39274308e3690cf072396cf1ae82b6743d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Introduce the session commandChristian Kandeler2019-09-1816-1/+1416
| | | | | | | | | | | | | | | | | | | | Offers a JSON-based API for interaction with other tools via stdin/ stdout. This allows for proper qbs support in IDEs that do not use Qt or even C++. Change-Id: Ib051a40b7ebe1c6e0c3147cca9bd96e7daec1fde Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | Fix wrong capitalization of Windows-specific header fileRichard Weickelt2019-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This header file is lower-case, even on Windows. But it would remain undetected because NTFS is not case-sensitive by default. Correct capitalization is required when cross-compiling with MinGW on Linux. Change-Id: I584ae7c9dcf81597a2b9b6481e95fc65ec6e125a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | baremetal: Auto-detect IAR toolchain for MSP430 architecture on WindowsDenis Shienkov2019-08-151-2/+7
| | | | | | | | | | | | Change-Id: Ifc15d008ffd64e160d40a0a3e0f1b868dde4e8a4 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | C++: Add support for clang on WindowsChristian Kandeler2019-08-141-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | This is about clang in "mingw mode", not clang-cl. When targeting Windows, clang is a lot like mingw, so factor out the common parts into a new base module. Testing uncovered a number of invalid assumptions in our autotests, which are also fixed in this patch. In addition, minor adjustments had to be made to the Qt.core module and to the qbscore lib. Change-Id: I73085dc62a65e2a9d0397cf234c8641989246f22 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | baremetal: Add additional filter '*-gcc-[1-9]*' stringDenis Shienkov2019-07-301-0/+2
| | | | | | | | | | | | | | | | ... that allow to auto-detect the GCC toolchains with names like 'avr-gcc-5.4.0' and so forth. Change-Id: I004f68b8aeb2a17124cfd53d3643584dc6aa1bc6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Auto-detect GCC toolchains for ARM and AVR architectures on WindowsDenis Shienkov2019-07-301-1/+81
| | | | | | | | | | | | | | ... provided by Microchip (Atmel). Change-Id: I230899e53cac3029fd910c9a3cc8112c86fd1ac0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Auto-detect GNU ARM toolchains on WindowsDenis Shienkov2019-07-301-1/+37
| | | | | | | | | | | | | | | | | | ... which are installed from this site: https: //developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm Change-Id: Ic7e8886e53ede7b86289ef514eccd94870e17676 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.14 into masterChristian Kandeler2019-07-261-3/+43
|\| | | | | | | Change-Id: Ic632b377bf10e2b320956011e9a7d4eea99f560b
| * Improve clang-cl auto-detectionIvan Komissarov2019-07-251-1/+41
| | | | | | | | | | | | | | | | | | Now also check for the clang-cl in the default install locations Task-number: QBS-1316 Change-Id: I5d0dfd2b98164b0cac08358001cd1946b4f8aadc Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Add IAR STM8 toolchain supportDenis Shienkov2019-07-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a basic support of the IAR Embedded Workbench toolchain for the STM8 processors family. To use it with Qt Creator, it is enough to add there a desired Kit with a custom IAR C/C++ compiler, and then set the following in the Kit's Qbs profile settings: * Key: qbs.toolchainType * Value: iar Tested with EW for STM8 v3.11.1 on Windows using the simple projects samples which come with the default IAR installer. Change-Id: Ibc116ceb33b7df49c3241d26fa97136255ba06dd Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Auto-detect SDCC profiles for all supported architecturesDenis Shienkov2019-07-261-45/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous SDCC toolchain auto-detection algorithm based on an assumption, that the default target architecture always is MCS51. But, the SDCC compiler support multiple architectures: * http://sdcc.sourceforge.net/ A target architecture sets by the special command-line flag (f.e. -mmcu51 for 8051, -mstm8 for STM8 and so forth). As previously we have added the STM8 architecture support to the SDCC compiler, then it is reasonable to create a multiple SDCC profiles for one compiler for the different supported architectures. Right now, the SDCC compiler will be auto-detected as two instances: * with mcs51 architecture * with stm8 architecture Change-Id: I62949a30b770dab005628dc4fbd6ae67f5cf28ff Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix qbs-setup-toolchainsChristian Kandeler2019-07-241-2/+2
| | | | | | | | | | | | | | | | We must not insert empty tool file paths into a profile. Change-Id: Ic2f2815e011cd98e9c690348fb1a86c9be7f17de Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Refactor the GCC/Clang/MinGW compilers auto-detectionDenis Shienkov2019-07-234-90/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now the qbs-setup-toolchains can auto detect all installed compiler versions from the directories specified in the PATH environment variable. Also it tries to ignore all duplicate compiler executables found in same directory. F.e. if some directory contains two compiler names 'arm-none-eabi-gcc-9.1.0' and 'arm-none-eabi-gcc', and they are equal, then the compiler 'arm-none-eabi-gcc-9.1.0' with a longer name will be chose. Change-Id: I395dcbf79f4fc8d4653b1a51a751388a8d8d3f12 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | qbs-setup-toolchains: Refactor and improve the code a bitDenis Shienkov2019-07-1613-44/+57
| | | | | | | | | | | | | | | | | | | | * Added 'QBS_SETUPTOOLCHAINS_' prefix to all ifdef guards. * Unified the parameters order for the createXyzProfile() functions. * Used QFileInfo instead of QString as a compiler path variable. Change-Id: Ib4cfafa8d5ad4fe9e8ca8b06e4cfc17eafc67626 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Move GCC/MinGW/Clang stuff to separate gccProbe moduleDenis Shienkov2019-07-156-185/+321
| | | | | | | | | | | | | | ... that simplifies a code bit. Change-Id: I4688e7b28986687d7cca5ad5fc8ab333cb50d8d2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix compare '<' operator for ToolchainInstallInfoDenis Shienkov2019-07-111-2/+7
| | | | | | | | | | | | Change-Id: Ie411f0f2316a46eb8e6d4b39f5f1e8c20d8927eb Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Detect KEIL compiler version if it is found in a pathDenis Shienkov2019-07-091-4/+84
| | | | | | | | | | | | | | | | | | | | | | | | Previously we have only the KEIL toolchain version detection from the Windows registry. This patch adds a compiler version detection in case the compiler path specified in a PATH environment variable. Change-Id: Ic3b183adbe4f655c18a2a96b7e30cba343f9d0d0 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Detect SDCC compiler version if it is found in a pathDenis Shienkov2019-07-091-4/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously we have only the SDCC toolchain version detection from the Windows registry. This patch adds a compiler version detection in case the compiler path specified in a PATH environment variable. Change-Id: I6a9b74efbd8e4a8cd7a596bdf4946745d820f7f9 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Detect IAREW compiler version if it is found in a pathDenis Shienkov2019-07-033-4/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously we have only the IAR toolchain version detection from the Windows registry. This patch adds a compiler version detection in case the compiler path specified in a PATH environment variable. Change-Id: I61578723e15f109542aba1e231753aec611439eb Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Insert the version into auto-detected SDCC profileDenis Shienkov2019-07-032-21/+25
| | | | | | | | | | | | | | | | | | This is useful in case we have installed a multiple toolchain versions. Change-Id: I4a2030589c21394da1b951eeeee99cbb5e1116a3 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Insert the version into auto-detected KEIL profileDenis Shienkov2019-07-032-21/+25
| | | | | | | | | | | | | | | | | | This is useful in case we have installed a multiple toolchain versions. Change-Id: I842cc5c5d281427385306e9d4aaaee7736a8a227 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Insert the version into auto-detected IAREW profileDenis Shienkov2019-07-023-22/+34
|/ | | | | | | | | This is useful in case we have installed a multiple toolchain versions. Change-Id: Ia6d5fa1be16199d5e5f1eea8a077fcb885ba42e6 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.13 into masterChristian Kandeler2019-06-141-1/+1
|\ | | | | | | Change-Id: Idab53d6bd9b6f2841e30d4a31f53ac53a05c2f09
| * Add Visual Studio 2019 support1.13Joerg Bornemann2019-06-071-1/+1
| | | | | | | | | | | | Fixes: QBS-1451 Change-Id: I644835cf8ce18d546e6c8e2c75f689766456555d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Fix some warnings about null pointersIvan Komissarov2019-06-041-2/+2
| | | | | | | | | | | | | | Some of them are false positives, some of them are possible bugs. Change-Id: Ic9c8a2970587e5152659b5b19f6b6d6df67e6809 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix build with namespaced QtChristian Stenger2019-06-033-0/+6
| | | | | | | | | | | | | | | | Amends f08904c155ad, 39462767f9c8, c3f90175c389. Change-Id: If3535ba8502ab3de4eccc6b33c29b205c9a0b889 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Fix readability-static-definition-in-anonymous-namespace warningsIvan Komissarov2019-05-214-55/+43
| | | | | | | | | | | | | | Move static functions out of anonymous namespaces Change-Id: Iae6d13189b716e47b21f4c11e1c337487f78fad5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Apply modernize-loop-convert fix-itIvan Komissarov2019-05-211-2/+2
| | | | | | | | | | | | | | Makes clang-tidy happier Change-Id: Ic29b552572719ea58c7ad385cc6e1d68cef9eedc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Apply modernize-use-auto fix-itIvan Komissarov2019-05-201-2/+2
| | | | | | | | | | | | | | | | Makes clang-tidy happier Change-Id: I75f3b6409b425b9a7054d7886ab0160a040b25d5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Improve the KEIL toolchain auto detectionDenis Shienkov2019-05-175-62/+265
| | | | | | | | | | | | | | | | Now the KEIL compiler path also extracts from the Windows registry in addition to the path feature Change-Id: I8a92233ff58119ea7c3cc40e6da95408e0ced1ba Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Improve the IAR toolchain auto detectionDenis Shienkov2019-05-175-64/+270
| | | | | | | | | | | | | | | | Now the IAR compiler path also extracts from the Windows registry in addition to the path feature. Change-Id: I77d2cc13924afac751445df98ea60f1f62f9d892 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Improve the SDCC toolchain auto detectionDenis Shienkov2019-05-175-64/+244
| | | | | | | | | | | | | | | | Now the SDCC compiler path also extracts from the Windows registry in addition to the path feature. Change-Id: I84148e464696fdfffc6342d22baa1d75c6caa0ce Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Do not allow to enter leading and trailing spaces in qbs-config-uiIvan Komissarov2019-05-061-0/+44
| | | | | | | | | | | | Task-number: QBS-1427 Change-Id: I46e1dab6baf964a7f42fe96a3fb3be37cf6e692f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Apply fix-its for the missing override keywordIvan Komissarov2019-05-033-4/+4
| | | | | | | | | | | | | | | | Missing override is a warning in clang Change-Id: I90b899df37e690aebb942bffc65db54d9aa4050f Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix uninitialized variablesIvan Komissarov2019-05-028-18/+18
| | | | | | | | | | | | | | | | | | This fixes most of clang analyzer warnings about uninitialized variables in ctors Change-Id: I879c785594307ed3fe7140588338a6b2a1e4db65 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | qbs-setup-qt is not needed anymoreBogDan Vatra2019-04-251-25/+1
| | | | | | | | | | | | | | Now we have automatic Qt detection, and that set is not needed anymore. Change-Id: I9c01dad173ac70cbeaab64b412255057d7ce8cbd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Add SDCC toolchain supportDenis Shienkov2019-04-101-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a basic support for the SDCC compiler: * http://sdcc.sourceforge.net/ As this compiler support multiple architectures, then it is impossible to uniquely identify the current architecture by dumping of the pre-defined macros (because its content depends on a target flag). In this case the cpp.architecture will contains a default architecture (which is dumped with an omitted target flag). To use it with Qt Creator, it is enough to add there a desired Kit with a custom SDCC C/C++ compiler, and then set the following in the Kit's Qbs profile settings: * Key: qbs.toolchainType * Value: sdcc To create the SDCC profile it is enougth to use the following command: qbs setup-toolchains --type sdcc <path/to/sdcc/compiler/binary> <profile name> A toolchain type can be omitted; in this case the QBS will tries to detect the toolchain type from the specified compiler name. Also it is possible to auto-detect the SDCC toolchain from the PATH environment using the following command: qbs setup-toolchain --detect At current time are supported only the 8051 (aka MCS51) architecture; other architectures can be added later. Change-Id: I8cc239d62e35472ab667e054a64a1e59c2d548bd Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add support for the clang-cl compilerIvan Komissarov2019-04-108-10/+276
| | | | | | | | | | | | Task-number: QBS-1316 Change-Id: Ibf9da364610c260ead088a8990a70c7739d53c39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.13 into masterChristian Kandeler2019-03-183-4/+4
|\| | | | | | | Change-Id: I0678ef8cf6f81489914e79be903ca4d4c1cebada
| * setup-qt: Fix magic MSVC version number used for compatibility checkChristian Kandeler2019-03-181-1/+1
| | | | | | | | | | | | | | MSVC 2017 starts at 19.1, not 19.10. Change-Id: Ib65d36ca19af829c8e616f40db6bcb11d9b288f0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix version detection for MSVC 2017David Schulz2019-03-151-2/+2
| | | | | | | | | | | | | | | | | | The version number for recent MSVC2017 installation has changed to the format \d+\.\d+\.\d+\.\d+ and the second number is not guaranteed to be a zero. Change-Id: I13728d2a5ea3162c3ff29558757cd576a83f4983 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix some warningshjk2019-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of them really necessary or even desirable to fix, but... tools/launcherinterface.cpp:114:80: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] api/projectdata.cpp: In function ‘QString qbs::mapToString(const QVariantMap&, const QString&)’: api/projectdata.cpp:882:15: warning: ‘void qSort(Container&) [with Container = QStringList]’ is deprecated: Use std::sort [-Wdeprecated-declarations] parser/qmljsparser.cpp: In member function ‘void QbsQmlJS::Parser::reallocateStack()’: parser/qmljsparser.cpp:72:104: warning: ‘void* realloc(void*, size_t)’ moving an object of non-trivially copyable type ‘class QStringRef’; use ‘new’ and ‘delete’ instead [-Wclass-memaccess] etc. The QStringRef is the only one theoretically applicable, but isn't in practice given the current implementation. Change-Id: Idb2a03e3fd096b6ad428615f81266f952d2a8d95 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use pass-by-value and moveIvan Komissarov2019-03-071-2/+4
| | | | | | | | | | | | | | This fixes -Wmodernize-pass-by-value Change-Id: I85a732867866e43c39c1d77937fbc645433c96bd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix calls to non-const begin()/end() in range-for loopsIvan Komissarov2019-03-063-8/+13
|/ | | | | | | | This fixes -Wclazy-range-loop Change-Id: I08a435b700017cdbe27fbfdbda6e26840d9a3568 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Return initializer list where it is possibleDenis Shienkov2019-02-268-113/+99
| | | | | | | | | This fixes this clang-tidy warning: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] Change-Id: I421e1e47462fe0e97788672684d47943af7df850 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use QStringLiteral more where it is possibleDenis Shienkov2019-02-2519-174/+173
| | | | | | Change-Id: I7419cc3fbc1e8776de3943852dcedab4c95d1c32 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>