aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/artifactcleaner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use pass-by-value and moveIvan Komissarov2019-03-071-6/+8
| | | | | | | This fixes -Wmodernize-pass-by-value Change-Id: I85a732867866e43c39c1d77937fbc645433c96bd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Print debug output when the project's "dirty" flag is writtenChristian Kandeler2018-04-261-1/+1
| | | | | Change-Id: I67bac50beea4efb572b3299137ef52dc725647ee Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make ProductBuildData a proper class with accessors and modifiersChristian Kandeler2018-01-231-3/+4
| | | | | | | | We will need to keep track of some mutating accesses in a follow-up change. Change-Id: I8b3c92f6cca0f5dceb35ef7559cc1357cdf38656 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* corelib: Gather string constants in central placeChristian Kandeler2017-11-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* STL compatibility: use push_back() instead of operator<<Jake Petroules2017-11-161-1/+1
| | | | | | | ...and operator+= Change-Id: I848610544cacc2d187d601c0db567703c3e68c93 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* STL compatibility: use size() instead of count()Jake Petroules2017-11-151-2/+2
| | | | | | | This is a simple find and replace with manual sanity check. Change-Id: Ia733befe7885dc3c643d5c84e151312bfd86a3c6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add missing override keywordsJoerg Bornemann2017-09-191-1/+1
| | | | | Change-Id: I647a04501fbc279d0434d9b8a6160dad1a4f907e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Remove all usages of Q_FOREACH from the libraryChristian Kandeler2017-02-211-1/+1
| | | | | | | | This will make it easier to experiment with exchanging Qt containers for STL ones, for instance. Change-Id: Ie591fa54b5241ad4841b1ebcfb78b72932cd2b38 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use a sorted vector rather than QSet or std::setChristian Kandeler2017-01-051-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | ========== Performance data for Resolving ========== Old instruction count: 2324724447 New instruction count: 2317712921 Relative change: -1 % Old peak memory usage: 21411584 Bytes New peak memory usage: 21070552 Bytes Relative change: -2 % ========== Performance data for Rule Execution ========== Old instruction count: 4231322611 New instruction count: 4246208129 Relative change: +0 % Old peak memory usage: 19239000 Bytes New peak memory usage: 18181072 Bytes Relative change: -6 % ========== Performance data for Null Build ========== Old instruction count: 542161499 New instruction count: 505511534 Relative change: -7 % Old peak memory usage: 13599040 Bytes New peak memory usage: 11892952 Bytes Relative change: -13 % Change-Id: I36b3dbd3fd2a4bc7503ee7779d31bd0217000785 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Change style of #includes of Qt headersJake Petroules2017-01-041-6/+6
| | | | | | | | | | | | | | | | By using q<lowercase>.h headers, we become more bootstrap-friendly, as no full syncqt is required any more. In the same go, prefix all includes with the module name. This helps grep-based analysis of which parts of Qt are used and where. It's also consistent with Qt's public headers (where syncqt enforces the style). Testdata and examples are excluded from the change, as they are not relevant for bootstrapping. Change-Id: I9539b1d795e87fca6e5fc6c91acbb775b79208d9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update license headersIikka Eklund2016-08-291-14/+23
| | | | | | | | | | Patch-set 2 includes *.cpp *.c Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ie6e493097af6f7dd6a8adff170eb856f496e689e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-061-1/+1
| | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not give special treatment to target artifacts in "qbs clean".Christian Kandeler2015-09-041-11/+0
| | | | | | | | | | | | The differentiation between "remove all artifacts" and "remove only non- target artifacts" was probably introduced originally to allow people to save space in their build directory while still being able to run their project from there. However, people can (and should) simply install their project in that case, which is the default anyway these days. So now "qbs clean" does what "qbs clean --all-artifacts" used to do. Change-Id: Id307bee9c2605a22e3f42669df298a1ba20b393b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix cleaning of rescuable artifacts.Christian Kandeler2015-08-311-1/+14
| | | | | | | | | | | | | | | | | | | The following sequence was problematic: 1) qbs build someModuleProperty:true 2) qbs resolve someModuleProperty:false 3) qbs clean Step 2) causes the artifact objects to get removed from the build graph and their relevant information stored in the list of rescuable artifact data, so that on the next build the files will either get re-created as artifacts or removed from the disk, depending on whether the changed property causes their transformer command to change. The problem was that the ArtifactCleaner only looked at the build graph and was not aware of rescuable artifact data. With this patch, we go through the list of rescuable artifacts and remove the entries from that list as well as from the disk. Change-Id: I05348fa1e92268c58f75074ea99371e39cc662f4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* update license headersJoerg Bornemann2015-03-021-2/+2
| | | | | Change-Id: I36d825db3a5ef32c162c3063aab1e8a1f2696f4f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Update LicenseEike Ziller2015-01-261-6/+6
| | | | | Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* License update.Eike Ziller2014-10-161-7/+8
| | | | | | | Add LGPLv3 option. Change-Id: I8a63ad5e46a2701032b2103f791df4dec5b707e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make the "clean" operation interruptible.Christian Kandeler2014-04-281-2/+8
| | | | | Change-Id: I60f221a0dfcc2786dfaa6b655cbce7f899a2027b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* API: Do not present all root artifacts as target artifacts.Christian Kandeler2014-04-171-1/+1
| | | | | | | | E.g. Transformer outputs are roots, but not target artifacts. Task-number: QBS-557 Change-Id: Ia2ab5567344911b0751deed465722deb182e4aaf Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Work around braindead QFileInfo::exists() behavior for symbolic links.Christian Kandeler2014-04-151-1/+1
| | | | | Change-Id: If8002fc7be0cc6af954ebb28ccbcb7bee1031e1c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fixed removing hidden files in a build treeIvan Komissarov2014-04-071-1/+1
| | | | | Change-Id: I9378a85318f0fa6da84dc6343ce1d7f5e253c028 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix potential infinite loop in build dir cleaning.Christian Kandeler2014-03-181-1/+3
| | | | | | | | | | We should not even try to remove any empty directories outside the actual build tree, as they might not belong to us. Task-number: QBS-533 Change-Id: Ia5f4caf97155b0a1711add1bb5efd5f8fa08562b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* support transformers with an unknown number of outputsJoerg Bornemann2014-02-131-1/+1
| | | | | | | | | | | | | | | | To support different types of nodes in the build graph, we introduce the base class BuildGraphNode. Artifact now derives from BuildGraphNode. A RuleNode class is introduced that represents a rule in the build graph. Rules are applied in the build phase and not in a pre-build phase anymore. The handling of moc has been revisited. The fixed automoc pre-build phase is no more. This is the squashed merge of a feature branch. Task-number: QBS-370 Change-Id: If27cdc51cba8c9542e4282c2caa456faa723aeff Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Prepare for using QT_NO_CAST_FROM/TO_ASCII.Jake Petroules2014-01-141-1/+1
| | | | | Change-Id: Ib39e49e896cbddf5a5bd851088500991d962355a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Move Qt profile setup into a dedicated library.Christian Kandeler2014-01-101-0/+209
Otherwise all changes to the implementation will have to be duplicated in IDEs. Change-Id: I61e6d4fa1ee9b724eb5d9de9f233dc915a6c8bc3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>