summaryrefslogtreecommitdiff
path: root/qbs-resources
Commit message (Collapse)AuthorAgeFilesLines
* qbs build: Fix qbsbuildconfig moduleChristian Kandeler2023-04-041-1/+1
| | | | | | | | This module does not have an explicit dependency on the Qt module, so there should be no "Qt" identifier in scope. Change-Id: Iafa7e95bdf53e873bb37c9408a1ed93e0b42dc20 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Switch JavaScript back-endChristian Kandeler2023-02-072-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer clang versions seem to expose serious bugs in QtScript, whose complexity makes it difficult to track them down. We therefore switch to the more light-weight QuickJS, which offers all the features we need (most notably property access interception), as well as good performance. To save some porting effort, we removed the long-deprecated loadFile() and loadExtension() functions. During the porting procedure, we noticed and fixed thread safety issues in artifact access from JS commands. We consider this change important enough to bump the major version, so the next release will be 2.0. Detailed benchmarking data is below. In summary, we see a modest speed- up at the cost of a similarly modest increase in memory consumption (with the exception of project resolving on macOS, which has become a bit slower). Importantly, the increase does not rise with project size, as the comparison of qbs vs Qt Creator shows. Output of qbs_benchmarker on Linux with qbs as test project: ========== Performance data for Resolving ========== Old instruction count: 12870602895 New instruction count: 11923459780 Relative change: -8 % Old peak memory usage: 61775848 Bytes New peak memory usage: 67583424 Bytes Relative change: +9 % ========== Performance data for Rule Execution ========== Old instruction count: 4074062223 New instruction count: 3887473574 Relative change: -5 % Old peak memory usage: 35123704 Bytes New peak memory usage: 38398392 Bytes Relative change: +9 % ========== Performance data for Null Build ========== Old instruction count: 1104417596 New instruction count: 1011033948 Relative change: -9 % Old peak memory usage: 24461824 Bytes New peak memory usage: 25325920 Bytes Relative change: +3 % Output of qbs_benchmarker on Linux with Qt Creator as test project: ========== Performance data for Resolving ========== Old instruction count: 67166450352 New instruction count: 60772791018 Relative change: -10 % Old peak memory usage: 327011616 Bytes New peak memory usage: 343724176 Bytes Relative change: +5 % ========== Performance data for Rule Execution ========== Old instruction count: 71684351183 New instruction count: 67051936965 Relative change: -7 % Old peak memory usage: 374913688 Bytes New peak memory usage: 387790992 Bytes Relative change: +3 % ========== Performance data for Null Build ========== Old instruction count: 8383156078 New instruction count: 7930705668 Relative change: -6 % Old peak memory usage: 180468360 Bytes New peak memory usage: 182490384 Bytes Relative change: +1 % Real-world data building Qt Creator (using qbs --log-time, several runs, removing outliers): macOS: Resolving: 43s -> 47s Rule execution: 17s -> 14s Windows: Resolving: 18s -> 16s Rule execution: 22s -> 17s Fixes: QBS-913 Fixes: QBS-1103 Fixes: QBS-1126 Fixes: QBS-1227 Fixes: QBS-1684 Change-Id: Ie5088155026e85bbd1e303f1c67addb15810a3cb Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* GitHub actions: add UBSAN jobIvan Komissarov2023-01-311-1/+3
| | | | | Change-Id: Ib98b51305b491f3c1b54af2bf03738df08c5f789 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* qbs build: Fix use of warning flagChristian Kandeler2022-07-041-1/+3
| | | | | | | -Wconstant-logical-operand is clang-only. Change-Id: I8dbba65b503b865ac331ce555b941f9dc1929e3a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Qt support: Add /permissive- flag with MSVCChristian Kandeler2022-06-031-0/+7
| | | | | | | | | This is required for user applications as of qtbase/0dc6cc055174a0556f2e41ca269013b3a7056c86. Also update our own build system files accordingly. Change-Id: Ibc640555cdf0cae6e0c5353b2f5d99af4475b510 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Remove `import qbs` from all project filesDenis Shienkov2021-08-046-7/+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>
* GitHub actions: fix building debug infoIvan Komissarov2021-05-102-2/+2
| | | | | | | | | | This fixes building and arhiving the debug information. We do not build debug info in release build for now to avoid including it in the archive - it should be in a separate archive Change-Id: I01878676190b410b3b76c9bb477dd74bf4cdd767 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace "product" variable by "exportingProduct" in Export itemsRaphael Cotty2021-05-072-7/+7
| | | | | | | | | | | | "product" variable in an Export item will point to the "importingProduct" in 1.21. This patch prepares the change by replacing "product" by "importingProduct" when necessary. Task-number: QBS-1576 Change-Id: I215d46484754e76771039a750dc4beb33d8a0c9c Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix building unit tests with bundled Qt.scriptIvan Komissarov2021-03-171-0/+22
| | | | | | | | | Some of those tests require Qt.script headers which are used in corelib's headers. Introduce a new QbsUnitTest item type that pulls in the dependency on Qt.script/scriptengine for those tests. Change-Id: I5b981b910191ba690eded14bdf64b540f334bd53 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Remove QTextCursor API from ChangeSetIvan Komissarov2021-03-171-1/+1
| | | | | | | | | | | It appears that neither Qbs not QtCreator use that API. Also, remove QtGui dependency in corelib and enable project files updates by default. Change-Id: I2eb90d0a7bc74bca4f1007eb63164111f52adb1b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Bump c++ version to the 17th standardIvan Komissarov2020-08-211-1/+1
| | | | | | | We can do that now as QtC moved to c++17 in master Change-Id: I91d7fc425f1b288f341ee3025fec61a53e98c8d9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* qbsbuild: inherit QbsAutotest from QbsProductIvan Komissarov2020-08-211-4/+2
| | | | | | | To reduce copy&paste Change-Id: I3c21b5c793217950c3527899b6382d86494ee12f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* qbsbuild: move logging to the static libraryIvan Komissarov2020-08-202-25/+1
| | | | | Change-Id: I94bd7288a9ef3b7a785a76386ff7d395cdd01f81 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* qbsbuild: get rid of the QbsLibraryBaseIvan Komissarov2020-08-203-27/+25
| | | | | | | | Nothing set in there is required for static libraries. Also, we should set the QBS_STATIC_LIBRARY macro only for the qbscore library. Change-Id: Ia225730694358062cc57e460443142cef36674e2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Bump required Qt versionChristian Kandeler2020-07-241-1/+1
| | | | | | | | ... to 5.14. We need >= 5.12 for a recent QRegularExpression patch, and 5.14 is also what Qt Creator is currently on. Change-Id: I674e7b617acaed2bf2f668a31f82e800f05ccfc8 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* qbs build: Fix excessive clang 10 warnings triggered by Qt headersChristian Kandeler2020-05-141-3/+7
| | | | | Change-Id: Ifbeae178a53f003fed9fdbbfae433a85ef261fb7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Enable QT_NO_CAST_FROM_BYTEARRAYIvan Komissarov2020-04-211-1/+5
| | | | | | | | | Silently casting QByteArray to char* is dangerous and it's hard to find an error in the code. Thus, forbid implicit casting and fix code accordingly. Change-Id: I216f1b19768ad529ff050df0e81bfc4ad10b7c00 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Move some Visual Studio generator parts into libqbsmsbuildJake Petroules2020-04-173-22/+34
| | | | | | | | | | | | This static library contains the MSBuild and Visual Studio solution object model classes and serialization code, without any qbs project model specifics. The latter goes into the generator plugin itself. The Xcode generator will follow the same separation of concerns design when it is introduced. Change-Id: I0a7aca2457c7b7474e0a0a127a3ce5fbec7682f6 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use docker-compose exclusively for managing Docker imagesRichard Weickelt2020-03-261-50/+0
| | | | | | | | | | | | | | | | | | Qbs used to have docker products and a module for building the images, but this became obsolet and was superseded by the docker-compose infrastructure. Docker-compose is a much better fit for our use-case (which is mostly CI). It allows us to use unique (and complicated) tags both when building and running the images without exposing that to the user. Unique tags like bionic-5.12.6_1.14.1-2 instead of just bionic ensure that changes in the infrastructure don't suddenly break builds in older branches using the same image. This patch also updates the documentation to emphasize the usage of docker-compose. Change-Id: I45335d37034d10dda5ab5079ee3be1f81cb3e5c5 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* qbs build: Add more sanity check convenience propertiesChristian Kandeler2019-10-231-1/+12
| | | | | Change-Id: Ifa60c6510a720e49bebf892a6060926f918aa2d7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Bundle Qt libraries on all platformsRichard Weickelt2019-10-102-3/+5
| | | | | | | | | | | | | | | | | | | | This patch allows us to deploy a self-containing Qbs package on all host platforms that are supported by the official Qt binary packages. Although not all (Linux) distributions make use of it, this will be helpful to - provide at least some binary convenience packages for the most important distributions, - perform building and testing in different environments, for instance build Qbs in one stage and then run autotests for desktop, iOS, android in parallel on multiple machines, - avoid windeployqt which does not work when cross-building for Windows on a Linux hosts. Change-Id: I63de4ea2240b37d8bd465cbbf4ddff3d01eeac7e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* qbs build: Fix GCC 9 warnings triggered by Qt headersChristian Kandeler2019-07-021-3/+13
| | | | | | Change-Id: I7795cb20d7af1c5fd46d8cdbdc3fa46cad5963bb Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Increase minimum required Qt versionChristian Kandeler2019-04-261-1/+1
| | | | | | | | | We recently merged a patch that used Qt 5.10 functionality. Let's use this opportunity to increase the minimum required Qt version. We choose 5.11, since that is also Qt Creator's requirement. Change-Id: I729a7e840ab9cdafb8f9fba604e413cd4b822bed Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qbs build: Fix look-up of qbs executable by autotestsChristian Kandeler2018-11-211-1/+1
| | | | | | | | The code worked only if qbs.installPrefix was empty. Change-Id: I9ba69f10c976b4a2b71ae4934c4cdac58895882a Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qbs build: Allow building with address sanitizerChristian Kandeler2018-08-311-0/+7
| | | | | Change-Id: I339f5d986acd99240f388b83bfc29acfd19939ba Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* qbsbuildconfig: Do not pull in cpp if withCode is falseJoerg Bornemann2018-08-081-2/+5
| | | | | | | Task-number: QBS-1376 Change-Id: I79b470bc57d4188791209bca87a9042f7c385a84 Reviewed-by: Alexander Shevchenko <sav_ix@ukr.net> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove support for in-build-dir-execution of the qbs qbs buildJoerg Bornemann2018-07-123-6/+7
| | | | | | | | | | 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>
* Remove compatibility code for building qbs with qbs < 1.11Joerg Bornemann2018-07-121-9/+3
| | | | | Change-Id: Ib425ea13906e89ee59b11bb22b7778bd0b88070c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove qbs 1.9 compatibility code from qbsbuildconfigJoerg Bornemann2018-07-121-10/+0
| | | | | | | | Since commit 33a0c11a5f this hack isn't even used when building with qbs < 1.10. Change-Id: I48a7819ed9acd2cdaa2fa820c4c1121abcff27dc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add module Exporter.pkgconfigChristian Kandeler2018-06-042-0/+12
| | | | | | | | | | | | This module generates .pc files for products, optionally attempting to derive some of the entries from the contents of the Export item. [ChangeLog] Added new module "Exporter.pkgconfig" for creating pkg- config metadata files. Task-number: QBS-1232 Change-Id: Ic41e645e4462e8f85ad6c2025fb967e88d3438f9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add support for system-level settingsChristian Kandeler2018-06-011-0/+1
| | | | | | | | | | | | | In addition to the traditional per-user settings, there is now also a system-wide settings file affecting all users. The file's platform- specific default location can be overridden at build time. The qbs-config tool can write these settings via the new --system option. [ChangeLog] Introduced the concept of system-level qbs settings Change-Id: Ie6f675a74e96ce1fa7b2dd0712f6106071e848a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qbs build: Add convenience properties for building staticallyChristian Kandeler2018-05-092-2/+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>
* Merge 1.11 into masterChristian Kandeler2018-04-201-1/+1
|\ | | | | | | Change-Id: Iebe7584bd2978a8f8be093c6b366033076f83e74
| * Fix type of visibilityType property in QbsLibrary.qbsJoerg Bornemann2018-04-191-1/+1
| | | | | | | | | | | | Change-Id: I250d1b6a1c228a02818f509d1f389fb8ccc273c1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add QtScript git submoduleJoerg Bornemann2018-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds QtScript as a git submodule to build the qbsscriptengine library. QtDeclarative support has been stripped out. We don't need that. Windows CE and Symbian platform support has been removed. JIT has been disabled, which improves resolve/rule execution by 8%. [ChangeLog] Bundled QtScript as a submodule. Task-number: QBS-913 Change-Id: Idfbaf06eb2cef3985e5eae955f231686499f7754 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Bump required Qt versionChristian Kandeler2018-04-031-1/+1
| | | | | | | | | | | | | | ... and remove the workarounds that are no longer needed. Change-Id: Ie0ae19279633784f8cea3bdbe4a9eeaa308689aa Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Add module Exporter.qbsChristian Kandeler2018-03-142-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | This module generates qbs modules from products, providing an interface to them for use by external projects. [ChangeLog] Added new module "Exporter.qbs" for creating qbs modules from products. Task-number: QBS-1231 Change-Id: I9f0cf04b441aaf279cf19a84fd94d97a8cea9de8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Run autotests using the qbs from the install root if availableJake Petroules2018-02-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | ...as opposed to relying on the qbs binary existing in the same directory as the test binaries and being usable from that location. This is necessary for some generators (as they generate projects which call the same qbs binary as they were generated with) where an invocation on the qbs binary in the non-installed location may fail to find dependent libraries when invoked from an outside environment. Change-Id: I4d35a6f70df3ad4c48b202f73399ffe1704f78ca Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Build qbs with C++14Christian Kandeler2018-02-152-2/+2
| | | | | | | | | | | | | | | | | | 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-143-2/+1
|/ | | | | | | ... rather than separately in the derived items. Change-Id: I3f036ad45269daaa44aabfcd017c524083c84399 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* qbs build: Make the Qt bundling functionality configurableChristian Kandeler2018-01-301-0/+1
| | | | | | | We don't want that in Qt Creator. Change-Id: I811eed24fae6cb3f652a89d37138d8cf00992057 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qbs build: Re-add rpaths for our autotestsChristian Kandeler2018-01-251-0/+1
| | | | | | | They got accidentally removed in 5a1bb1db8e. Change-Id: I75a78507eddd9c225d846870d9515807c6117f27 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* qbs build: Remove exported qbsbuildconfig dependencyChristian Kandeler2018-01-111-1/+0
| | | | | | | It was left over. Change-Id: I0104b5ef046a0d31b3d780a079f8ecc5c9abb5e6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Account for the Qbs docs build now requiring additional dependenciesJake Petroules2018-01-051-1/+1
| | | | | | | | | | | | | | Document it, and install the dependencies in the Docker images. For the man page build, the installed version of the qbs app is now used to get the help text rather than the non-installed version, since the non-installed version may not be able to find all library dependencies (like Qt) on some platforms by default. The build also now depends on the other executables as well since their presence affects the output of qbs --help. Change-Id: Ic9896231aa76a346180bf30f7b2483391f5e4ea0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix qbs buildChristian Kandeler2017-12-121-5/+3
| | | | | | | | | | | | Was broken by 5a1bb1db8e. We must not use FileInfo::cleanPath() on the string "$ORIGIN/../lib", as that will simply strip away the first two components. Also, use joinPaths() rather than resolvePath() to construct the paths (as we always want to concatenate, even if the second argument looks like an absolute path), and don't read qbs.installRoot unnecessarily. Change-Id: Idf919c664a2e0ef1ea9a4052d1d0e591a52a234c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Rewrite rpath handling for binaries that are a part of Qbs itselfJake Petroules2017-12-084-10/+32
| | | | | | | | | | | | | | | | | | | | | | 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>
* macOS: set a compatibility version on our shared librariesJake Petroules2017-12-071-0/+1
| | | | | | | | | | | Qbs currently promises BC for the same minor release. Therefore, set the compatibility version to the same as the SONAME version. In addition to the mere declaration for correctness, this also helps to allow the OS to prevent loading a mismatched qbs binary and libraries if such a situation happens to occur. Change-Id: Ic1cfdcab29e1efd6c51872d650d77f2ea7f2bbf1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix qbs build with MSVCChristian Kandeler2017-12-051-1/+4
| | | | | | | cpp.soVersion is only defined for GCC-like compilers. Change-Id: I26c12a47534458cf4ed805e6e70b5579f9a15ebb Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* qbs build: Set soversionChristian Kandeler2017-12-011-2/+1
| | | | | | | It's time. This property was introduced in 1.7. Change-Id: Ief8ef2b05c12922be3f8b6a82d4de3dfb0068066 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Allow overriding the autotest profile for each test suite individuallyJake Petroules2017-11-151-0/+4
| | | | | | | | | | For example, this allows a Qt profile to be set only for the Qt test suite, which avoids default profile properties "polluting" the results of other test suites. Change-Id: Ie6eb7131a9ce6b90c21b4e33e41f8f32df0e01e8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>