summaryrefslogtreecommitdiff
path: root/share/qbs
Commit message (Collapse)AuthorAgeFilesLines
* Fix accessing binaries from libexecIvan Komissarov2021-03-306-7/+33
| | | | | | | | | Starting from Qt 6.1, some binaries were moved to libexec/ directory from bin/ (e.g. moc, rcc, uic). Fixes: QBS-1636 Change-Id: Iaa329773a3ffcea5f09c0663dd4159d839980525 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* codesign: do not sign intermediate products when multiplexingIvan Komissarov2021-03-303-4/+17
| | | | | | | We should only sign the resulting binary during the lipo step. Change-Id: If4d508bcdf347bf2fc68d345ed8d5913a7457f8d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge "Merge branch '1.18' into master"The Qt Project2021-03-302-26/+40
|\
| * Merge branch '1.18' into masterIvan Komissarov2021-03-182-26/+40
| |\ | | | | | | | | | Change-Id: If4dfeed28c475b8d0db13b5a39a0d6752b2a5052
| | * protobuf: fix setting includePath in nanopb.qbsIvan Komissarov2021-03-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This amends 0d42ca4d0f8b0866b51ac9587f68a6550ca6d3fe. Change-Id: I3650056431c51ae8d67575e217bfaebcf49b4f08 Reviewed-by: Kai Dohmen <psykai1993@googlemail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
| | * protobuf: fix accessing undefined objectIvan Komissarov2021-03-152-26/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always execute Probes to find files protobuf libs and headers even when the user passes path to those manually. This is required for the correct search of different library variants. This amends 87fdf5002. Change-Id: Ic7b9368b2b17925da33fd16299e31fd016043466 Reviewed-by: Kai Dohmen <psykai1993@googlemail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | | Share cpp::objectSuffix propertyDenis Shienkov2021-03-308-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes sense to add the cpp.objectSuffix property to the base CppModule due the following reasons: 1. It is possible that the user wants to change the extension for the generated object files, which makes working with Qbs more flexible. 2. It will be easier to write an autotests that check the generation of the object files for a bare metal platforms, where object files can have various extensions such as ".rel", ".r90", ".r43", and so forth. Change-Id: Ib73836d5e614a6924d312d061f02437c3b318785 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | | Add missing artifact tags for loadable modules when multiplexingIvan Komissarov2021-03-211-1/+2
| | | | | | | | | | | | | | | Change-Id: I910e56161c815822f87f9754ad8ce5aceed2bd3a Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | | qt6: fix setting up Qt.uitools module on MacIvan Komissarov2021-03-191-1/+6
|/ / | | | | | | | | | | | | Since Qt6 it is a framework, not a standalone library Change-Id: I1561cea04a0472704d21f4ebbb5d5bc07d9c758d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Merge branch '1.18' into masterIvan Komissarov2021-03-022-2/+6
|\ \ | |/ | | | | Change-Id: Ia45a5502f2d3c30807b5cab14666070973654b3a
| * protobuf: fix _libraryName prop if protobuf is not foundIvan Komissarov2021-02-222-2/+6
| | | | | | | | | | | | Change-Id: Ia0cc1583ca95ce97b99c136433125cb90c59f3be Reviewed-by: Kai Dohmen <psykai1993@googlemail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Patch *.rel files generated by SDCC compiler on windows hostDenis Shienkov2021-02-281-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... before linking. SDCC still has an bug on Windows where it generates the object files in the DOS format instead of Unix format, that leads to the linking errors: * https://sourceforge.net/p/sdcc/bugs/2970/ A workaround is to remove all CR characters from the object files, what was done in the previous fix in Qbs. But that solution does not work since the TextFile service forcibly adds the CP characters to the ends of lines on the Windows host. We need to use the BinaryFile service instead which operates with the RAW data. Change-Id: I09f44a707081de6af7300348e743b6076366dd2c Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | baremetal: Report only existing compiler's include paths for IARDenis Shienkov2021-02-271-2/+3
| | | | | | | | | | | | | | ... to pass the tests. Change-Id: I536a12d4da1634c8f4f02587c41e29750b64f8fc Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | baremetal: Fix typo in `--endian` option for IAR ARM or RX assemblerDenis Shienkov2021-02-271-1/+1
| | | | | | | | | | | | | | We need to use `--endian <option>` instead of `--endian=<option>` Change-Id: Ic9f3a7d06491a99ca330cf7f40bab3bbf0ceb486 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | codesign: add _canSignArtifacts propertyIvan Komissarov2021-02-194-4/+13
| | | | | | | | | | | | | | | | Android cannot sign individual artifacts so simply checking if codesign.enableCodeSigning is true is not enough Change-Id: Ie27ec2b9b7b3b7d7356324590c78b4b967c1b54e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge branch '1.18'Ivan Komissarov2021-02-196-4/+66
|\ \ | |/ | | | | Change-Id: I4e437865514add88558f66420718bc02fb39e41d
| * qt6: fix handling qtmain in setup-qt.jsIvan Komissarov2021-02-121-0/+2
| | | | | | | | | | Change-Id: I00fa1d5e3a2fdb24a84afe713c3ea2c4543f84bd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Qt/Android: Extend rule cycle prevention hackChristian Kandeler2021-01-261-2/+6
| | | | | | | | | | | | | | | | | | | | | | After we did remove the hpp tag from the java-generated header, it was re-added by a file tagger in the cpp modules file, leading to an unexpected state on rebuilding. Fix this by replacing the tag, rather than removing it. Fixes: QBS-1628 Change-Id: I9d182cd30cf9a637733b84234e7a0b37f7583334 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
| * Xcode: Fix XCode auto-detectionIvan Komissarov2021-01-042-1/+55
| | | | | | | | | | | | | | | | If Xcode is moved to another location, we should use xcode-select -- print-path to find it rather than using hardcoded path. Change-Id: I9b5eba19c9e732e5e9da0322320fb0406249e020 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Add more paths to search in Library and Include probesJan Blackquill2020-12-232-1/+3
| | | | | | | | | | | | | | | | | | These paths are used by containerisation systems such as Flatpak; searching in these by default makes building Qbs applications in Flatpak et. al easier Change-Id: I438ba1ffd66845ac1331791428135eb70105ff34 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Implement codesign moduleJake Petroules2021-02-1811-348/+826
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves code signing functionality into a dedicated module, and also implements automatic provisioning for Apple platforms, which automatically selects appropriate signing identities and provisioning profiles based on the product being built. This also results in a significant performance improvement since all code signing setup information is retrieved in process instead of forking off the openssl and security command line tools. Task-number: QBS-899 Change-Id: I60d0aeaeb2d1004929505bcb1e0bc77512fe77bc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Test for array-like objects with instanceof ArrayRichard Weickelt2021-02-1512-15/+15
| | | | | | | | | | | | | | | | | | | | Array.isArray() seemed to work for arrays created in scripts as well as for QStringList and QVariantList created in C++ when using QtScript. QJSEngine is more strict (see the comments in QTBUG-45018). One way to work around that problem is to use instanceof Array instead. Change-Id: I0f1c8757a5ab2f82e26eff19a8b5ecf667bb04b1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Get rid of product.moduleProperty() during project resolvingRichard Weickelt2021-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Although not documented, it was possible to access module properties via product.moduleProperty("module", "property"). That is still possible in the QJS port of Qbs, but would complicate the implementation of Evaluator unnecessarily. After all it was only needed in a single place. It can still be used in rules. Change-Id: I40f374a57a6fefc85eb45250b472fe732b66f0b7 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Place isNotSystemRunPath in the correct scopeRichard Weickelt2021-02-141-4/+5
| | | | | | | | | | | | | | | | The function isNotSystemRunPath() was used outside of its definition scope. Although that was valid JavaScript, it was still confusing. Change-Id: I25269ce8356637d00ddc281696ae6828f9345488 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Do not rely on leaked context variablesRichard Weickelt2021-02-132-5/+5
| | | | | | | | | | | | | | | | | | | | | | The current QtScript implementation seems to leak variables of the prepare script context to invoked JS functions. This will become an error in the JS port. Amends d3fa7fe. Change-Id: I5618efe7e1e8a19656f6a2e6a086267405dd69ec Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Avoid writing to the global objectRichard Weickelt2021-02-132-3/+3
| | | | | | | | | | | | | | | | Some variables were accidently created in the global object. This will become an error in the QJS port. Change-Id: Ifa4d929bb7a97af3e49de5c3d7d87924f9c3ad81 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Do not rely on leaked context variablesRichard Weickelt2021-02-131-1/+1
| | | | | | | | | | | | | | | | | | The current QtScript implementation seems to leak variables of the prepare script context to invoked JS functions. This will become an error in the JS port. Change-Id: If4b43e6162b4c3ea1f1ec8f118474064dc9586c0 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Add missing import statementsRichard Weickelt2021-02-133-0/+4
| | | | | | | | | | | | | | | | | | The current QtScript implementation does not warn about missing import statements in some cases. Imported .js files should never inherit imports. This will become an error in the JS port. Change-Id: I880afabba64c0766063304c723242e242ac89b81 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | protobufcpp: add linkLibraries option to disable modifiying linked libs + ↵Jan Blackquill2021-02-061-4/+15
| | | | | | | | | | | | | | | | | | | | include paths This allows one to use Qbs' support for protoc without causing libprotobuf/libgrpc to be linked automatically, which is useful for when you want to build libprotobuf/libgrpc as part of your project. Change-Id: Ia40ebf6d79682b4ed88631f0ea540eeb6aad0bff Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | baremetal: Add support for HCS08 architectures to SDCC toolchainDenis Shienkov2021-02-021-0/+8
| | | | | | | | | | | | | | | | | | | | 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: Improve detection of IAR compiler includesDenis Shienkov2021-02-021-27/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IAR compiler has an undocumented command line option `--IDE3`, which allows you to print a list of compiler include paths as: `$$TOOL_BEGIN $$VERSION "3" $$INC_BEGIN $$FILEPATH "<path\\to\\directory>" $$TOOL_END` Besides, the same approach is used in the IAR extension for the VSCode IDE. So we can use this approach to implement it the Qbs module as well. In addition, this commit contains an autotest to check the `cpp.compilerIncludePaths` property. Change-Id: I434dd630913e5afd6cba5b4e31e1021ee0c5fe31 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | baremetal: Return only existing SDCC compiler include pathsDenis Shienkov2021-02-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some architectures, the compiler may return nonexistent header paths. For example, for the `stm8` architecture, it returns the path: c:\Program Files (x86)\SDCC\bin\..\include\stm8 which is not present on the file system. This can be confusing intellisense for IDEs, and will also make it harder to write tests for `cpp.compilerIncludePaths` property. So, it makes sense to return only existing paths. Change-Id: Ibe7078485db900eba2e17710e5de0abeda28f645 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Handle cpp.prefixHeaders property in IAR assemblerDenis Shienkov2021-01-291-1/+10
| | | | | | | | | | | | | | | | | | | | | | We need to pass the `--preinclude` option and to the assembler too in case the `cpp.prefixHeaders` is not empty. One caveat is that this option is not supported on all architectures and we need to handle it properly. Change-Id: I31eda38a8f400a0534a43d141ee64aef405fa683 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Handle cpp.endianness property in IAR assemblerDenis Shienkov2021-01-291-0/+5
| | | | | | | | | | | | | | | | | | The IAR assembler for ARM and RX architectures allows you to specify a target endiannes parameter. So we need to handle this use case as well. Change-Id: Ifa6c237fb2d4fc7de361290edcaa491bb23e3165 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Improve JS code in IAR toolchain moduleDenis Shienkov2021-01-291-171/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a small refactoring in the cpp module for IAR, containing the following changes: 1. Alphabetical sorting by architectures and compiler names has been performed. 2. Some common logical parts are divided into separate functions. 3. Improved logic for checking compilers for supported options depending on the architecture. Also, the command line options of toolchains have been rechecked for all supported architectures. Change-Id: I5d274240682cb16c073d146ce47541d10783738f Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Android: Conditionnally depends on cpp remove old fixRaphaël Cotty2021-01-291-3/+9
| | | | | | | | | | | | | | | | | | | | Cpp module is not required when used in the aggregate in multi-arch mode. Only define "ANDROID_HAS_WSTRING" for Qt < 5.14.0 Change-Id: Ibb0ed6f23352466ec703c96488233eda1940daad Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | baremetal: Add support for HCS12 architectures to GCC toolchainDenis Shienkov2021-01-281-0/+2
| | | | | | | | | | | | | | | | | | | | This patch adds the HCS12 architectures, provided by Freescale Semiconductor: * https://en.wikipedia.org/wiki/Motorola_68HC12 Change-Id: If4e671f4d894f9c305b9fda2c4412c19b971ee3d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Add support for HCS08 architectures to IAR toolchainDenis Shienkov2021-01-261-5/+17
| | | | | | | | | | | | | | | | | | | | 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-5/+14
| | | | | | | | | | | | | | | | | | | | 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>
* | Do not modify the product objectRichard Weickelt2021-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | Since the script creates and modifies a local 'imports' variable, the local variable should also be used for iteration. Otherwise we rely on 'imports' being a reference only. While this is the way how copying objects works in JS, it is still not clean, especially since we view the product object as read-only. Change-Id: I1ffe61e03b793d5ed36d069e983014172db85463 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Merge branch '1.18'Ivan Komissarov2020-12-1813-53/+65
|\ \ | |/ | | | | Change-Id: I37c359289dcd957fbc964a35fab381a047f7d04a
| * Add missing nanopb generator file extension on windowsKai Dohmen2020-12-171-4/+4
| | | | | | | | | | | | | | | | When using nanopb on windows the generator script has the ".bat" extension. Change-Id: Ia7a836784a0709d30dcf2e8b9c26c2a38b703c86 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
| * Fix qt4 binary path detectionv1.18.0Raphaël Cotty2020-12-141-1/+2
| | | | | | | | | | | | | | | | | | | | Commit e8b186610738a16fe8ddaacd39797d863828c7aa removed the use of QT_INSTALL_BINS property if QT_HOST_BINS doesn't exists to set the binaryPath. But qt4 needs it because QT_HOST_BINS doesn't exist. Change-Id: I3e5bc10d3b4839bd62a1202ff5cbc939f0a3b2b0 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix building .xcassetsIvan Komissarov2020-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | In several cases, actool can create an Info.plist file which is assigned "partial_infoplist" tag and incorrectly used as an output parameter for the "--output-partial-info-plist". Fix that by using the last element in the array which is prepended to the list of artifacts returned by actool in actoolOutputArtifacts() Change-Id: Ide41ceb0f984a5ded91d13b38cc019ab8d804586 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * protobuf: explicitly disable auto refcount for generated filesIvan Komissarov2020-12-141-0/+1
| | | | | | | | | | | | | | | | ...for objective-C. Otherwise, enabling this property on a product level breaks compilation of these files. Change-Id: Iddf1c12f580a22b751607a20bd10a79963f775f8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Probe for release and debug version of protobuf librariesKai Dohmen2020-12-122-4/+30
| | | | | | | | | | | | | | | | | | | | When cpp protobuf or nanopb gets compiled as debug build the library gets the suffix "d". The library probe will search for the release name and the debug name. If no library could be found let the user set the library name. Change-Id: I6574986e527fe4484935e58ccf45c86feee230e5 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
| * baremetal: Handle preprocessor flags for SDCC toolchainDenis Shienkov2020-12-081-0/+1
| | | | | | | | | | Change-Id: I6a82b1334e3f8e160ea1a48181fe1ac438844c35 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
| * Android: Fix debugging supportRaphaël Cotty2020-12-086-41/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add archSuffix to generate the library with the architecture name for Qt > 5.14 (before the lib was renamed which prevented debugging). Remove rpaths as they are not used on android and generate warnings. Update target and defines to comply with android's Build System Maintainers Guide. Remove stripping step in Qt.android_support as androiddeployqt actually does the stripping. Change-Id: I46a273c1cded753223c7b759670477815b625267 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix installing standalone loadable modulesIvan Komissarov2020-12-081-0/+2
| | | | | | | | | | Change-Id: I0d233878a6f18d29e6228431fa6cbc3cde3c99a5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Pass import paths as nanopb_opt to support `.options` filesKai Dohmen2020-12-032-2/+10
| | | | | | | | | | | | | | | | | | | | | | To make use of nanopb specific options defined in a separate `.options` file pass import paths to nanopb generator script. This is needed because protoc doesn’t currently pass include path into plugins. Therefore if your .proto is in a subdirectory, nanopb may have trouble finding the associated .options file. Change-Id: I28eb2e9c2f353df88aa1a1e772dfb57a36800434 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>