aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* baremetal: Remove unused method in IAREW STM8 generatorDenis Shienkov2019-08-201-1/+0
| | | | | | Change-Id: I6b009a42e2383d792d6a22c9f7343efd342454c9 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Fix typo at data model detection in IAREW STM8 generatorDenis Shienkov2019-08-201-1/+1
| | | | | | Change-Id: Ibd5e115dbb1dc5ad6bfb5ee779cf3cb96aa00561 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Long live the KEIL UV project generator for ARMDenis Shienkov2019-08-2030-36/+1912
| | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the KEIL UVision IDE, e.g. using the following command: qbs generate -g keiluv5 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid KEIL QBS profile, from which the generator take a desired target architecture and other stuff. The KEIL UV generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native KEIL UVsion project. Currently it is supported only one 'keiluv5' generator which allow to generate a projects for the KEIL UVision v5 for ARM architecture. Tested with the KEIL UVision v5.23 for ARM, using as the QBS bare-metal examples, and as other projects. Change-Id: I3af9d01f25a9570a99a62d4ce2c30fec3566b9a1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use different names for virtual functions in INodeVisitorIvan Komissarov2019-08-168-16/+16
| | | | | | | | This fixes compiler warnings about hidden virtual functions in derived classes Change-Id: I3b53d07263f66133a41353eb6cfe05e1f3b20cc3 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Call missed AvrCompilerSettingsGroup::buildCodePage() methodDenis Shienkov2019-08-011-0/+1
| | | | | Change-Id: I3ae23881f310393c82935ef59e91609e6b13efeb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Long live the IAR EW project generator for STM8Denis Shienkov2019-08-0118-0/+2082
| | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the IAR Embedded Workbench IDE, e.g. using the following command: qbs generate -g iarew3 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid IAR EW QBS profile, from which the generator take a desired target architecture and other stuff. The IAR EW generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native IAR EW project. Currently it is supported only one 'iarew3' generator which allow to generate a projects for the IAR EW for STM8 for all versions of 3 series. Tested with the IAR EW for STM8 v3.11.1, using as the QBS bare-metal examples, and as other projects. Change-Id: I47880d62cd1e81ed7bbfba840a5af0c558065013 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Share common generators codeDenis Shienkov2019-07-3197-2230/+957
| | | | | | | | | | | Common code which are used for the 'iarew' and 'keiluv' generators was moved to the corelib/generators library. Besides, this code also can be used in future for the XML-based generators. Change-Id: I79a21e3e078d563600d7f365785731fe9e847045 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Long live the KEIL UV project generator for 8051Denis Shienkov2019-07-3050-1/+4239
| | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the KEIL UVision IDE, e.g. using the following command: qbs generate -g keiluv5 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid KEIL QBS profile, from which the generator take a desired target architecture and other stuff. The KEIL UV generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native KEIL UVsion project. Currently it is supported only one 'keiluv5' generator which allow to generate a projects for the KEIL UVision v5 for 8051 architecture. Tested with the KEIL UVision v5.23 for 8051, using as the QBS bare-metal examples, and as other projects. Change-Id: I248f1d220d9c9bcae9cb07d5bfbabbb85f9c39c9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.14 into masterChristian Kandeler2019-07-261-8/+8
|\ | | | | | | Change-Id: Ic632b377bf10e2b320956011e9a7d4eea99f560b
| * Avoid some deprecation warnings for QLatin1Literal useshjk2019-07-221-8/+8
| | | | | | | | | | Change-Id: I8fe64c2ab78b1cf2e1af2a6aa2dad201299a0a94 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add additional namespaces and ifdef guard prefixesDenis Shienkov2019-07-2237-177/+312
| | | | | | | | | | | | | | | | | | ... to avoid a possible future conflicts with a same class names (e.g. at attempt to add a new generators). Change-Id: Ib8c4218a7f76e2a001dd1354b7676a0843a109ea Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Long live the IAR EW project generator for 8051Denis Shienkov2019-07-1816-0/+2585
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the IAR Embedded Workbench IDE, e.g. using the following command: qbs generate -g iarew10 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid IAR EW QBS profile, from which the generator take a desired target architecture and other stuff. The IAR EW generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native IAR EW project. Currently it is supported only one 'iarew10' generator which allow to generate a projects for the IAR EW for 8051 for all versions of 10 series. Tested with the IAR EW for 8051 v10.10.1, using as the QBS bare-metal examples, and as other projects. Change-Id: If8a7397bebf6176010d42cfda41230e50a499a69 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix compilation errors with MSVC2015Denis Shienkov2019-07-151-0/+12
| | | | | | | | | | | | | | | | | | ... this regression was introduced in commit 808d246607b768ea4dc02e3ef0b178e058d6575c Change-Id: I8b4ea97060d99d4ef39aac8c05bdb438d50d1cc1 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Long live the IAR EW project generator for AVRDenis Shienkov2019-07-1116-0/+2418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the IAR Embedded Workbench IDE for Microchip AVR architecture, e.g. using the following command: qbs generate -g iarew7 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid IAR EW QBS profile, from which the generator take a desired target architecture and other stuff. The IAR EW generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native IAR EW project. Currently it is supported only one 'iarew7' generator which allow to generate a projects for the IAR EW for AVR for all versions of 7 series. Tested with the IAR EW for AVR v7.20.1, using as the QBS bare-metal examples, and as other projects. Change-Id: Ic5811e579e86b868d5946637db9d8780ef47968b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Long live the IAR EW project generator for ARMDenis Shienkov2019-07-1148-1/+4898
|/ | | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the IAR Embedded Workbench IDE, e.g. using the following command: qbs generate -g iarew8 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid IAR EW QBS profile, from which the generator take a desired target architecture and other stuff. The IAR EW generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native IAR EW project. Currently it is supported only one 'iarew8' generator which allow to generate a projects for the IAR EW for ARM for all versions of 8 series. Tested with the IAR EW for ARM v8.20, v8.32, v8.40, using as the QBS bare-metal examples, and as other projects. Change-Id: I2aa24d5a635f1f5a0e645bec8c30053e960d90a3 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix readability-static-definition-in-anonymous-namespace warningsIvan Komissarov2019-05-211-4/+0
| | | | | | | Move static functions out of anonymous namespaces Change-Id: Iae6d13189b716e47b21f4c11e1c337487f78fad5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply modernize-use-auto fix-itIvan Komissarov2019-05-202-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>
* Apply fix-its for the missing override keywordIvan Komissarov2019-05-0319-29/+29
| | | | | | | | 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-30/+22
| | | | | | | | | 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>
* Fix calls to non-const begin()/end() in range-for loopsIvan Komissarov2019-03-067-29/+52
| | | | | | | | 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-262-19/+7
| | | | | | | | | 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-253-9/+9
| | | | | | Change-Id: I7419cc3fbc1e8776de3943852dcedab4c95d1c32 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace 'typedef' with 'using' where it is possibleDenis Shienkov2019-02-231-1/+1
| | | | | | | | One exception is that the 'typedef' for function pointers were skipped due to an additional work is required. Change-Id: I2112fded3abeaee1d1f49f56adfd2914d5db0324 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use 'const auto' keywords more at objects allocationsDenis Shienkov2019-02-237-27/+27
| | | | | | Change-Id: I592d433e7c473ae9f27ca08e701516efe53650ba Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace non-const calls to temporaries with constIvan Komissarov2019-02-211-1/+1
| | | | | | | | This fixes -Wclazy-detaching-temporary Change-Id: I3c866c29c05f16e93eb86551efb21ccf9dc120b9 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* C++ scanner: Register for rc filesChristian Kandeler2019-01-171-1/+1
| | | | | | | | Windows resource files can have #include statements. This was either overlooked from the beginning or we broke it at some point. Change-Id: I3483e8caf352f557768429cf3c4f9b3293fec38d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.12 into masterChristian Kandeler2018-08-031-3/+5
|\ | | | | | | Change-Id: I0ce6c28f9117f945c9fec0654bd06daf3d13ace0
| * Fix OOM crash in QRC scannerJoerg Bornemann2018-08-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We implicitely created a QByteArray with the file content without passing the file size. This would result in copying the whole mmapped file into memory, and potentially much more if there's no terminating null byte. Fix this by using QByteArray::fromRawData which we pass the correct file size and which doesn't copy the data. Task-number: QBS-1375 Change-Id: I35c4cceba64343550094c29298ff9b3617718dac Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Remove support for in-build-dir-execution of the qbs qbs buildJoerg Bornemann2018-07-121-3/+1
|/ | | | | | | | | | This is not supported. People must use the content of the installation directory instead. This reduces complexity of qbs' own project files. Change-Id: I39f8bb4d5252b0631a64b3aac01f83b09b28ae0f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* C++ scanner: Properly handle UTF-8 byte order markChristian Kandeler2018-05-301-0/+10
| | | | | | | | | | | | | | Includes in the first line of a source file starting with a byte order mark would not get detected, resulting in failure to recompile after a header file change. Skip over the BOM before passing the data to the lexer. Task-number: QBS-1348 Done-with: Ola Røer Thorsen <ola@silentwings.no> Change-Id: I894a5b1667e49be5f8ce9b5cc66e4e796fd073f1 Reviewed-by: Ola Røer Thorsen <ola@silentwings.no> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Rename the generator/makefile directoryChristian Kandeler2018-05-097-2/+2
| | | | | | | | A directory called "makefile" breaks the make tool on macOS: make[2]: *** Makefile: Is a directory. Stop. Change-Id: Ic1f0f99f1599d6464d2596282be19603b8476a3d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qbs build: Add convenience properties for building staticallyChristian Kandeler2018-05-091-4/+4
| | | | | | | | So that we can easily test this functionality in the absence of a statically built Qt. Change-Id: I9c8f296222bc3155cb95219d4ababfd34e1e7e7b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add a Makefile generatorChristian Kandeler2018-05-097-1/+498
| | | | | | | | | | | | | At the very least, this is a useful debugging tool, as it displays the artifacts part of the build graph in a familiar format. Tested successfully with the qbs project itself: The generated Makefile could be used to build a working qbs on Linux and Windows. [ChangeLog] Added a Makefile generator Task-number: QBS-33 Change-Id: I8165168d9273bdb4853d4ac566b72087f9104f7a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not register the C++ scanner for header filesChristian Kandeler2018-05-071-1/+1
| | | | | | | | We only ever want to scan headers as part of recursively scanning a source file. Change-Id: Id6e9edf50b1af231839d55d29e1de08a1aba25f3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake build: Fix building plugins staticallyChristian Kandeler2018-05-031-7/+5
| | | | | | | | | For some reason, plugins.pri did not include use_corelib.pri when building statically, so the include paths were missing. Task-number: QBS-1229 Change-Id: I142da643772182ae78a3e68d91f19460223c7a6f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.11 into masterChristian Kandeler2018-04-051-3/+5
|\ | | | | | | Change-Id: Ia9e19bf1317c55d84602e4e0f54f7a4f412dd600
| * Adjust Visual Studio project generator to CLI changesJoerg Bornemann2018-03-221-3/+5
| | | | | | | | | | | | | | | | Configuration names must be prefixed by "config:". Task-number: QBS-1303 Change-Id: I63636141acdab7cc325378a1696e15842815d003 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fix rpath of plugins in qmake buildJoerg Bornemann2018-02-281-0/+1
| | | | | | | | | | | | | | | | | | Plugins never had a correct rpath in the qmake build. We never noticed, because all shared objects the plugins use are already loaded before the plugin is loaded. This will change in a later commit. Change-Id: I4e64a10070dc5092a9ce8272349cad24ec84a9ec Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Remove CONFIG += depend_includepath from our .pro filesJoerg Bornemann2018-02-281-1/+0
| | | | | | | | | | | | | | | | This is default since quite a while, and we never actively maintained a separate DEPENDPATH anyway. Change-Id: I3f376f0a3b7f4066be800f795ace05b753797461 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Build qbs with C++14Christian Kandeler2018-02-151-1/+1
| | | | | | | | | | | | | | | | | | This will enable us to simplify some of our templates. Qt Creator requires C++14 as well, so we won't break it. Change-Id: I577347ef12c53ff2ec59e88344ff181b27a0d50c Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | qbs build: Set cpp.cxxLanguageVersion in QbsProductChristian Kandeler2018-02-141-1/+0
| | | | | | | | | | | | | | ... rather than separately in the derived items. Change-Id: I3f036ad45269daaa44aabfcd017c524083c84399 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Use 'auto' keywords more for the allocated variablesDenis Shienkov2018-01-232-3/+3
|/ | | | | Change-Id: I25ec97e64522d7fa486fcf408d8134cbbd8b24ea Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Generators: Fix some includesChristian Kandeler2018-01-121-0/+1
| | | | | | | A public header was including a non-public one. Change-Id: I4ee209248cea04e03f618708f5299699e8cc2e3e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Rewrite rpath handling for binaries that are a part of Qbs itselfJake Petroules2017-12-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | Exporting a list of rpaths from a target is completely bogus as-is, because a target cannot know a dependee's install location relative to itself. This patch instead has each target category (executables in bin, libraries in lib, libexec binaries in libexec/qbs, and plugins in lib/qbs/plugins) set its relative installation directory at the product level, and then an appropriate rpath is created for the target by calculating a relative path from the target to the lib directory in the context of an installed build. This also has the advantage that rpaths are now calculated dynamically at build time rather than hardcoded, so if a user changes the directory depth of pluginsInstallDir, for example, everything will be adjusted automatically. Each target also therefore now has an rpath pointing exactly to its immediate dependencies, instead of relying on the parent process to inherit the rpath entries. Among simply being correct, this also has the advantage that any target can now be loaded correctly by another process which itself sets no rpath happening to point to the qbs lib directory. Change-Id: I8fdf24b74ef60426cea0930b7941479919226fd2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not use the set class outside corelibChristian Kandeler2017-12-072-7/+5
| | | | | | | It was and is meant for internal use only. Change-Id: Ibe15f5838f9b728ec397a668a94128abe4ef5efa Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Make Version a public classJake Petroules2017-12-011-1/+1
| | | | | | | It's already exposed in public API; i.e. via qtprofilesetup headers. Change-Id: I56950ce3163e6c5bd2c3fd08cc885b35723be5a7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Modernize variable declarationsDenis Shienkov2017-11-302-6/+6
| | | | | | | | Use 'const' and 'auto' keywords more where static_cast is used. Change-Id: I60152b90fe5e44aa1ca513b43f133e604ed6417f Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* corelib: Gather string constants in central placeChristian Kandeler2017-11-291-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same string literals appeared over and over again in the code base, causing redundancy in the sources as well as at run-time. We now give them a name and make sure they get instantiated at most once. String literals that occur only once are converted from QLatin1String to QStringLiteral unless they appear only in contexts that make use of QLatin1String overloads or they are clearly outside of any hot code paths. This seems to result in small, but measurable performance improvements, even if we assume the 1% changes to be noise: ========== Performance data for Resolving ========== Old instruction count: 3266514138 New instruction count: 3209355927 Relative change: -2 % Old peak memory usage: 29649896 Bytes New peak memory usage: 29436264 Bytes Relative change: -1 % ========== Performance data for Rule Execution ========== Old instruction count: 3367804753 New instruction count: 3319029596 Relative change: -2 % Old peak memory usage: 19577760 Bytes New peak memory usage: 19091328 Bytes Relative change: -3 % ========== Performance data for Null Build ========== Old instruction count: 608946535 New instruction count: 604566001 Relative change: -1 % Old peak memory usage: 14606384 Bytes New peak memory usage: 14579936 Bytes Relative change: -1 % Change-Id: Ia055a52e0a4b6fe6fd0f1e7ba4bfa583cba1b0ef Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Use minimal visibility for plugins as well as librariesJake Petroules2017-11-281-1/+1
| | | | | | | | Results in a smaller symbol table and seems like a no-brainer. It was only set to the less-strict "hidden" in the first place by mistake. Change-Id: I7bae6a88d0619507b54da345e9f6fec5a063744b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Build plugins as MH_BUNDLEs on macOSJake Petroules2017-11-281-5/+9
| | | | | | | | | | | | | | This is the native object format intended to be used for runtime loadable executable content (also known as "plugins"). Unlike most Unix systems, macOS's Mach-O executable format does differentiate between shared libraries (MH_DYLIB) and loadable modules (MH_BUNDLE). For the most part, the only noticeable difference is that attempting to link to an MH_BUNDLE will produce a hard error, which is in any case, helpful. Change-Id: I0d3ff284b3fe8f1b10700f1e48bc84dd5c4715b2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>