aboutsummaryrefslogtreecommitdiffstats
path: root/share
Commit message (Collapse)AuthorAgeFilesLines
* Fix setting PATH on Windows when invoking QbsIvan Komissarov2021-04-161-3/+2
| | | | | | | | | The original approach did not work when using NMake or MinGW Makefiles (but worked with Ninja) Change-Id: I1bfdb213b3007b100bb4cdcdbe4deb3935b6e266 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Qt support: Fix possible command line length issue with qmlimportscannerChristian Kandeler2021-04-122-5/+22
| | | | | | | | | | When there's a lot of QML files, we can hit the dreaded Windows limit for maximum command line length. Detect this condition and call the tool repeatedly if necessary. Fixes: QBS-1633 Change-Id: I20d123d6184eab08c5fa280a7c4811a753275f1f Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Fix generation of compiler listing filesDenis Shienkov2021-04-121-17/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... with custom extension for SDCC compiler. The SDCC compiler always generates the listing files in the format of 'module.c.lst', and there is no way to disable a generation, or to specify a different name for the listing file. In addition, we cannot change or delete the generated listing file until the linking is complete (this is such a feature of the SDCC compiler). So, to turn off the listing file generation, or to specify a custom listing file extension, we need to do the following extra steps: 1. If the custom cpp.compilerListingSuffix property is set, then we need to make a copy of the generated listing file after the compilation completes. And then to delete the all listing files with the '*.lst' extension after the linking completes. 2. If the cpp.generateCompilerListingFiles property is disabled, then we need to remove the all generated listing files with the '*.lst' extension after the linking completes. Change-Id: Ia235f7e2ebf88695e4648fb894624c7420968079 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Fix generation compiler listing using ARMCC compilerDenis Shienkov2021-04-081-15/+41
| | | | | | | | | | | | | | | | | | | | | The ARMCC compiler has no options for specifying the name of the output listing file; it only has an options for specifying an output directory. In addition, the generated listing files are in truncated format, e.g. instead of the 'module.{c|cpp}.lst' file will be generated the 'module.lst' file. This behavior complicates the writing of unit tests, and also complicates the implementation if the user wants to change the cpp.compilerListingSuffix property. A workaround is to post-process the compiler listing files after they are generated. In this case, we only need to rename the generated compiler listing file to the desired one. Change-Id: I89c81896711b90b146a94c35d2ec75e296824752 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Move post linker commands to separate functions for SDCCDenis Shienkov2021-04-081-53/+72
| | | | | | | | | It makes sense to move an additional post-build linker commands (that delete or change the linker map files, delete the listing files) into separate functions. Change-Id: I636347a9417f76f3f3dcfa000518437721357431 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Fix aapt compiling command on WindowsMax Bespalov2021-04-071-1/+2
| | | | | | | | | | When building appt2 package on windows aapt expects to see paths with windows separators. If path isn't converted you get "bad resource path" error. https://android.googlesource.com/platform/frameworks/base/+/9ba47d8/tools/aapt2/compile/Compile.cpp#59 Change-Id: Iabacb020920310533b034138e47d1839b845573a Reviewed-by: Raphaël Cotty <raphael.cotty@gmail.com> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Avoid using unicode characters in apple.qbsIvan Komissarov2021-04-061-7/+7
| | | | | | | | Some editors struggle with them Change-Id: I61672b6ca83facd7a2b2bf2fa763245aee94bce5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Share cpp::{assembler|compiler}ListingSuffix propertiesDenis Shienkov2021-04-068-22/+40
| | | | | | | | | | | | | | | | It makes sense to add the cpp.assemblerListingSuffix and the cpp.compilerListingSuffix properties to the base CppModule due the following reasons: 1. It is possible that the user wants to change the extension for the generated listing files, which makes working with Qbs more flexible. 2. It will be easier to write an autotests that check the generation of the listing files for a bare metal platforms, where listing files can have various extensions such as ".lst", ".ls", and so forth. Change-Id: I9989288bff0659dd3e8b7a443d0354bb78475270 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* baremetal: Improve linkerMapFile() testDenis Shienkov2021-04-051-3/+18
| | | | | | | | | | | | | | | Right now we can use the cpp.linkerMapSuffix property to find out the currently used linker map suffix. Also we can set a custom cpp.linkerMapSuffix value to make sure that this applies to the module. In addition, the generation of a custom linker map file for SDCC toolchain has been fixed. Change-Id: I8798cd6bea0ab6b5ea9728400827b8c98b11ba7b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* baremetal: Pass externalStaticLibraries() test for KEIL C51/C251/C166Denis Shienkov2021-04-051-9/+20
| | | | | | | | | | | | | Toolchains C51, C251, C166 do not support configuring library search paths to link. They support linking with libraries specified with full absolute paths to them. To work around this we supplement the absolute library paths using the cpp.libraryPaths property, if the library is specified without an absolute or relative path. Change-Id: Ic11fd8b87356b3a07ba5fd5c9763c8df39d0d4ac Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Share cpp::linkerMapSuffix propertyDenis Shienkov2021-04-017-9/+9
| | | | | | | | | | | | | | | | It makes sense to add the cpp.linkerMapSuffix property to the base CppModule due the following reasons: 1. It is possible that the user wants to change the extension for the generated map files, which makes working with Qbs more flexible. 2. It will be easier to write an autotests that check the generation of the map files for a bare metal platforms, where object files can have various extensions such as ".map", ".m51", ".m66", and so forth. Change-Id: I1e5e3b39bf84fddfe8c06f2db9d3936c6a3ff027 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Code signing moduleRaphaël Cotty2021-04-014-103/+210
| | | | | | | | | | | | | | Android.sdk was already signing the apk package but it was using hardcoded debug key and could only be used to run the application locally. The signing part of the android apk/aab package generation is now in the new codesign module. By default the same debug key is used. But it is now also possible to configure a different key. Task-number: QBS-899 Change-Id: I49c54a4d55578c48363805e927392b3a468805f0 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Android: Add support for ndk 22.1.7171670Raphael Cotty2021-03-312-41/+35
| | | | | | | | | | | | Android ndk 19 introduced a new layout for the platforms and sysroot directory. They are merged into the toolchain directory. Android ndk 22 removed the deprecated platforms and sysroot. Since the minimum required version of Android.ndk is 19 this patch switches Qbs to the new layout. Fixes: QBS-1637 Change-Id: Ie69d305ba77ac1689205e2fb2fd3414a3bada2bd Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Fix installing artifacts when multiplexingIvan Komissarov2021-03-313-5/+10
| | | | | Change-Id: Ice07b4b6cc918bd27e13b66c3c892a9be482a482 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Don't use Windows separators for KEIL toolchainsDenis Shienkov2021-03-311-32/+16
| | | | | | | | | We don't need to use the Windows path separators for the C51, C251 and C166 toolchains. These delimiters only complicate the code maintenance. Change-Id: Id87fd11259a1a1456a28e755eefa7e014b7f34d6 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* 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>