aboutsummaryrefslogtreecommitdiffstats
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 2.3 into masterHEADmasterChristian Kandeler4 days2-3/+3
|\ | | | | | | Change-Id: Ibfa0e6880a3da48c5fefa4a4ed3b0f450698d567
| * doc: fix links to ApplicationIvan Komissarov8 days2-3/+3
| | | | | | | | | | | | | | ...by renaming the Application page to Console Application. Change-Id: I192d3d3c65cd20019fb63b1309d564d4859f0aeb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge branch '2.3' into masterIvan Komissarov11 days1-5/+6
|\| | | | | | | Change-Id: Idca4efc5d0b44ceab159a8a287e125c85b57ae29
| * doc: fixes for PkgConfigProbeIvan Komissarov11 days1-5/+6
| | | | | | | | | | Change-Id: Ia8c0c51fad0a33d2e870c71d45868242e3a12238 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | tutorial: part 3Ivan Komissarov11 days2-1/+96
| | | | | | | | | | Change-Id: I39b6a7ab3fc3ef54e144684d1ac115599b630759 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use BinaryProbe in the pkgconfig providerRaphael Cotty11 days1-0/+11
| | | | | | | | | | | | | | | | This allows to re-use the code in the Probe rather than iterate over PATHS manually Change-Id: Ibc6da2b141329033ad1c3fc0f9f22a8170df74b3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 2.3 into masterChristian Kandeler2024-04-262-2/+2
|\| | | | | | | Change-Id: Ibcc502f9af2acce8b1b5949aa1ee7e33577a8ed3
| * doc: fix links between pagesIvan Komissarov2024-04-082-2/+2
| | | | | | | | | | Change-Id: Id3fe09f39398b4deffe0023a13115494737706b9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Remove the fallback providerIvan Komissarov2024-04-223-4/+0
|/ | | | | Change-Id: Idbb8b86d2630cd1852fca6792e7795a8a8df490e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Tutorial. Part 2Ivan Komissarov2024-03-142-1/+265
| | | | | Change-Id: I811abcf38adc1193491e736db580b709db28349f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add CMake Exporter moduleRaphael Cotty2024-02-292-0/+137
| | | | | | | | The module allows to generate a cmake package for Qbs libraries. Change-Id: I4405899ad73e87aeb63bd8471596e89770591b38 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Loader: Deprecate the fallback providerChristian Kandeler2024-01-313-19/+6
| | | | | | | | | | | The fallback provider creates modules for all named dependencies that were not found and only later checks during validation whether such a pkg-config module exists. This breaks assumptions all over the place. Since we have a superior replacement in qbspkgconfig, we now deprecate the fallback provider. Change-Id: I3694515865d63e7308cfab7778068aa2e480fe23 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Tutorial. Part 1Ivan Komissarov2024-01-303-2/+302
| | | | | | | | This change adds a step-by step tutorial that helps to explain Qbs concepts and best practices for new users. Change-Id: I5c669f8fa0f89b8300f241bb8e4ed7cd4b3bb4c6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove qbspkgconfig.mergeDependenciesChristian Kandeler2024-01-291-15/+0
| | | | | | | As promised. Change-Id: I2e13d220057225f1afcad0cab1e5e049313cae2b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Merge 2.2 into masterChristian Kandeler2024-01-122-4/+15
|\ | | | | | | Change-Id: I98cbee39cba1acd8a16eca1c9a11476e09011c15
| * protobuf: Usable without qbspkgconfigproviderBjörn Schäpers2024-01-111-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It only fails with "Can't find cpp protobuf runtime. Make sure .pc files are present" which is not helpful, since they are present. Additionally remove the grpcpp to grpc++ mapping in both pkg-config probes. This kind of amends 1772df50a3bacd91ba8125ececf774aa0e6311f9, I readded the tests. Task-number: QBS-1663 Change-Id: I73b7b76a66cc2b8eea5dddd57e5221715b6e6014 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * qbspkgconfig: Add support for the definePrefix optionIvan Komissarov2024-01-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On windows/msys, it is crucial to use autodetection for package paths - otherwise, Qbs is not able to detect e.g. protobuf package. The pkg-config has the --define-prefix switch that overrides the ${prefix} variables on the package with one based on the .pc file locaiton. Implement similar option and set it to true on Windows. Also fix setting sysroot to avoid duplication of sysroot in paths when prefix is autodetected. Change-Id: I2754e48a96cb2e5f01ecace616188782cb5b0d7a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge branch '2.2' into masterIvan Komissarov2024-01-091-0/+1
|\| | | | | | | Change-Id: I03789600e30aaa8d01d56777f08319d78813a260
| * apple: disable lazy linker mode for Xcode 15Ivan Komissarov2023-12-111-0/+1
| | | | | | | | | | | | | | | | | | | | According to the ld man, this mode is deprecated; with clang 15.0.0, it is no longer possible to pass this option via compiler frontend (it treats -lazy_library flag as -l flag and tries to link to "azy_library"). Change-Id: I74a877c359ae3550d372486e055a9b4c3e9be997 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 2.2 into masterChristian Kandeler2023-11-171-2/+2
|\| | | | | | | Change-Id: Iba58b0831b9962c5e6adb468f9074d1d2b8e401d
| * Add 2.2.0 change logv2.2.0Christian Kandeler2023-11-141-2/+2
| | | | | | | | | | | | | | Change-Id: I0e2b7a4d7e0595d6be90399f140d28154fe14a4e Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> (cherry picked from commit 17ec1be9c4d965f432de34f22fb2a4a2dfc04548) Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Add 'mold' as possible value for cpp.linkerVariantThorbjørn Lindeijer2023-11-091-2/+2
| | | | | | | | | | Change-Id: Ia9a874f09d87020c6f6999e6267596a03b64e721 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Add 2.2.0 change logChristian Kandeler2023-11-141-2/+2
| | | | | | | | | | Change-Id: I0e2b7a4d7e0595d6be90399f140d28154fe14a4e Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Add an LSP serverChristian Kandeler2023-11-071-0/+5
|/ | | | | | | | | | | | | | | This provides IDE-agnostic tooling via the Language Server Protocol (https://microsoft.github.io/language-server-protocol). The protocol implementation is taken from Qt Creator, plus a minimal set of dependencies. For now, our server provides only the "Goto definition" capability, which allows IDE users to click on a Depends item and get to the corresponding module or product. Task-number: QBS-395 Change-Id: Ia444aa7a6d1c114e4fd456098c74134ccdaadcec Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* protobuf: remove probe-based library lookupIvan Komissarov2023-10-111-36/+8
| | | | | | | | | | It is not reliable these days and it is hard to maintain it. Only leave provider-based lookup or built-in runtime (via private _linkLibraries property). Task-number: QBS-1663 Change-Id: I1cc3e3a7b18f721fe252d9b5489ed7495a9a6366 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* capnproto: make outputDir mutableIvan Komissarov2023-10-091-3/+1
| | | | | | Fixes: QBS-1760 Change-Id: Ia58ce88c7981ec35a132e783a4faa2a4cdda3328 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 2.1 into masterChristian Kandeler2023-09-221-2/+3
|\ | | | | | | Change-Id: I90fe01f29faa7b3a53ff8a38137af08ea32b85bd
| * doc: fix BinaryProbe examplev2.1.2-12.1Ivan Komissarov2023-09-181-2/+3
| | | | | | | | | | | | Change-Id: I6d9b26057f1e45458d42f18779d499953cae7e41 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Qt support: Let the user decide whether to use RPATH when linkingChristian Kandeler2023-09-211-0/+8
| | | | | | | | | | | | Fixes: QBS-1035 Change-Id: Idce0d39423b64c7cf04e1c84dd1a90de7bc4aeda Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Bump minimum Qt versionChristian Kandeler2023-09-121-1/+1
| | | | | | | | | | | | | | | | There's no need to drop Qt 5 just yet, but we should require the latest version. Change-Id: I2653ef5c3c244453db88a48d59e2c86eb38518b5 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Merge 2.1 into masterChristian Kandeler2023-09-084-14/+65
|\| | | | | | | Change-Id: I6176c269e1cb23e88179d6e53f1f2bf57a668176
| * apple: fix dmg.absoluteSourceBase default valueIvan Komissarov2023-09-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Dmg module collects all installables and replaces the absoluteSourceBase with stageDirectory. However, by default, we install the bundle to the installRoot/installPrefix/installDir folder and absoluteSourceBase missed the installPrefix path which is "/usr/local" on mac by default. Change-Id: I24dfab27b0321308347883376a052c479388418a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * doc: add docs for some missing Qt.core propsIvan Komissarov2023-09-071-0/+42
| | | | | | | | | | Change-Id: I883be3f550706ed8178dbb247dcb481d0a9dad4c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * doc: fix Group item docIvan Komissarov2023-09-071-10/+18
| | | | | | | | | | Change-Id: I8ed20eb9bd4470941fc7b3b170bf4d9bab96a49b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * doc: fix typoIvan Komissarov2023-08-301-1/+1
| | | | | | | | | | Change-Id: I94938476436eb9164900a5104fa3c45af3ed95df Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Let users specify a job count also when resolvingChristian Kandeler2023-09-051-0/+1
| | | | | | | | | | | | | | | | | | Preparation for loader parallelization. For simplicity, we do not introduce a new command-line option, but re- use the -j flag that was already present for building. Change-Id: I71ce31ec3ccc592d222bcfe14a8aaf311126020c Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | pkgconfig: deprecate mergeDependencies propIvan Komissarov2023-09-011-0/+3
| | | | | | | | | | Change-Id: Ibf553f9065e8002ba4dadd961de08d6f1951189a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Implement non-eager providersIvan Komissarov2023-07-111-0/+24
|/ | | | | | | | | | | | | | | | | | Non-eager providers instantiate modules one by one (as opposed to eager providers which instantiate all modules at once, e.g. Qt provider). Because Dependencies are loaded recursively, it is more flexible to use non-eager algorithm. Future plan based on this commit: - Make Qt provider and qbspkgconfig provider non-eager. This allows to deprecate eager providers as well as the fallback provider. Fixes: QBS-1706 Change-Id: Ib01a0791bedb137fadf9e8e7a4acc35cc4a657d0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* doc: move Special Property Values to a separate pageIvan Komissarov2023-05-113-55/+165
| | | | | | | | Also, document values that were not documented such as path, filePath, product, project. Change-Id: Ibad64e2998697b4c8c625c3088b835c8be428f54 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not merge deps in pkgconfig by defaultIvan Komissarov2023-05-031-4/+2
| | | | | | | | | | This was needed only as a workaround for packages with deep dependency tree. With the new module loader code, this is not needed anymore and we can start removing the prop. Fixes: QBS-1710 Change-Id: I47046049e89e705288f1b1ae04be625bd83302e8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* doc: fix introIvan Komissarov2023-04-221-15/+5
| | | | | Change-Id: I403a5a8f7716c88ed7c36d610cb1762e78be3e14 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Rewrite ModuleLoaderChristian Kandeler2023-04-201-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | =================== Problem description =================== The ModuleLoader class as it exists before this patch has a number of serious problems: - It instantiates modules over and over again everywhere a Depends item appears. The different instances are later merged in a hopelessly obscure and error-prone way. - It seriously pollutes the module scopes so that sloppily written project files appear to work even though they shouldn't. - Dependencies between products are handled twice: Once using the normal module instantiation code (with the Export item acting like a Module item), and also with a parallel mechanism that does strange, seemingly redundant things especially regarding transitive dependencies, which appear to introduce enormous run-time overhead. It is also split up between ModuleLoader and ProjectResolver, adding even more confusion. - The code is messy, seriously under-documented and hardly understood even by its original authors. It presents a huge obstacle to potential contributors. ================= Patch description ================= - Each module is instantiated once per product. Property values are merged on the fly. Special handling for dependencies between products are kept to the absolutely required minimum. - There are no more extra passes for establishing inter-product dependencies. Instead, whenever an unhandled dependency is encountered, processing the current product is paused and resumed once the dependency is ready, with the product state getting saved and restored in between so no work is done twice. - The ModuleLoader class now really only locates and loads modules. The new main class is called ProjectTreeBuilder, and we have split off small, self-contained pieces wherever possible. This process will be continued in follow-up patches (see next section). ======= Outlook ======= The ProjectTreeBuilder ist still too large and should be split up further into small, easily digestible parts with clear responsibilities, until the top-level code becomes tidy and self-documenting. In the end, it can probably be merged with ProjectResolver and Loader. However, this first requires the tight coupling between ProjectTreeBuilder/ModuleProviderLoader/ProbesResolver/ProjectResolver to be broken; otherwise we can't produce clean interfaces. As this would involve touching a lot of otherwise unrelated code, it is out of scope for this patch. ================= Benchmarking data ================= We first present wall-time clock results gathered by running "qbs resolve --log-time" for qbs itself and Qt Creator on macOS and Windows. The numbers are the average of several runs, with outliers removed. Then the same for a simple QML project using a static Qt on Linux (this case is special because our current way of handling plugins causes a huge amount of modules to be loaded). Finally, we show the output of the qbs_benchmarker tool for resolving qbs and Qt Creator on Linux. The data shows a speed-up that is hardly noticeable for simple projects, but increases sharply with project complexity. This suggests that our new way of resolving does not suffer anymore from the non-linear slowdown when the number of dependencies gets large. Resolving qbs on Windows: Before this patch: ModuleLoader 3.6s, ProjectResolver 870ms With this patch: ProjectTreeBuilder 3.6s, ProjectResolver 840ms Resolving Qt Creator on Windows: Before this patch: ModuleLoader 17s, ProjectResolver 6.8s With this patch: ProjectTreeBuilder 10.0s, ProjectResolver 6.5s Resolving qbs on macOS: Before this patch: ModuleLoader 4.0s, ProjectResolver 2.3s With this patch: ProjectTreeBuilder 4.0s, ProjectResolver 2.3s Resolving Qt Creator on macOS: Before this patch: ModuleLoader 32.0s, ProjectResolver 15.6s With this patch: ProjectTreeBuilder 23.0s, ProjectResolver 15.3s Note that the above numbers are for an initial resolve, so they include the time for running Probes. The speed-up for re-resolving (with cached Probes) is even higher, in particular on macOS, where Probes take excessively long. Resolving with static Qt on Linux (QBS-1521): Before this patch: ModuleLoader 36s, ProjectResolver 18s With this patch: ProjectTreeBuilder 1.5s, ProjectResolver 14s Output of qbs_benchmarker for resolving qbs on Linux: Old instruction count: 10029744668 New instruction count: 9079802661 Relative change: -10 % Old peak memory usage: 69881840 Bytes New peak memory usage: 82434624 Bytes Relative change: +17 % Output of qbs_benchmarker for resolving Qt Creator on Linux: Old instruction count: 87364681688 New instruction count: 53634332869 Relative change: -39 % Old peak memory usage: 578458840 Bytes New peak memory usage: 567271960 Bytes Relative change: -2 % I don't know where the increased memory footprint for a small project comes from, but since it goes away for larger projects, it doesn't seem worth investigating. Fixes: QBS-1037 Task-number: QBS-1521 Change-Id: Ieeebce8a7ff68cdffc15d645e2342ece2426fa94 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* freedesktop: Rename "name" property to "appName"Christian Kandeler2023-03-151-1/+1
| | | | | | | | | "name" is a built-in property of the Module item that must not be set by users. Astonishingly, this has worked so far due to the way the ModuleLoader code was written. Change-Id: I959bc0bba6b7c17a420fc6201031ab0bf4449292 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Docs: Do not use .contains()Christian Kandeler2023-02-207-37/+37
| | | | | | | Amends e3522f42773cfbb9a980e859c906457b3571fa1f. Change-Id: If51576f080ee5c01eeae493934cf646403594965 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Remove documentation for outdated JS extensions to Array and StringChristian Kandeler2023-02-161-24/+0
| | | | | | | | | | | String.{starts,ends}With() are part of ECMAScript 6 and supported directly by QuickJS. {String,Array}.contains() are superseded by ECMAScript's includes(). Deprecating them would needlessly annoy users, but we shouldn't encourage their use either. Change-Id: Ie0828ba0f78b0235e4b0a3127e56dc8fc2cc46dd Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Remove dangling link to unused hostOS propertyRichard Weickelt2023-02-141-2/+0
| | | | | | | | | | The hostOS property was taken out of the qbs module and replaced by the os property of the Host service. The whole bullet point is no longer valid. Change-Id: Ia35a51dffc7b7593e896b754f741cf12aab71db3 Fixes: QBS-1716 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* doc: fix typoIvan Komissarov2023-02-081-1/+1
| | | | | Change-Id: Icaa492b0fee01d37a4cf1940e6d8f456b532abbc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Switch JavaScript back-endChristian Kandeler2023-02-072-7/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* RIP QMake buildIvan Komissarov2022-12-164-123/+0
| | | | | | | | | | We have been supported CMake build for quite some time so users should have plenty of time to adapt. Ubuntu, Brew and macports also use CMake for building QBS. Change-Id: Ib78177f4a7ca8cdea1a2f3a8eac8bfe804674f32 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Add support for HPPA architectures to GCC toolchainPino Toscano2022-11-161-0/+3
| | | | | | | | Add the HPPA architecture, developed by Hewlett-Packard: https://en.wikipedia.org/wiki/PA-RISC Change-Id: Iec06ea4752326a70c2ceb210a3d4bdf8e19bdf47 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>