| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It appears, that destruction of complex QHashes/QLists took a bit time
in refcounts. Optimize them by using std::unordered_map and std::vector
instead. Plus, make structure simplier, instead of 2 hashes, use pair as
a key.
qbs::Internal::ProjectBuildData::~ProjectBuildData()
Before: 11.00 ms 0.1%
After: 6.00 ms 0.0%
Change-Id: I82d8bec5a465210cfa54762088f47c606c0e48e5
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
| |
Makes clang-tidy happier
Change-Id: I75f3b6409b425b9a7054d7886ab0160a040b25d5
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
| |
QLists were used with types that bigger than sizeof(void*) which lead to
extra allocations
Change-Id: Id716c6b4919f9a0ad62e1d2972319a600785afc5
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
| |
This fixes most of clang analyzer warnings about uninitialized variables
in ctors
Change-Id: I879c785594307ed3fe7140588338a6b2a1e4db65
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
This fixes -Wmodernize-pass-by-value
Change-Id: I85a732867866e43c39c1d77937fbc645433c96bd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
| |
This fixes -Wclazy-range-loop
Change-Id: I08a435b700017cdbe27fbfdbda6e26840d9a3568
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
| |
Change-Id: I7419cc3fbc1e8776de3943852dcedab4c95d1c32
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
| |
Change-Id: I592d433e7c473ae9f27ca08e701516efe53650ba
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
| |
... rather than after the prepare script has run. This gives a more
realistic estimate on average.
Fixes: QTCREATORBUG-18523
Change-Id: I61214903936f964e060b92238d5644f0a8414539
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ia115255ae46772a83c1196fbe291ff295927ee92
|
| |
| |
| |
| |
| |
| |
| |
| | |
An artifact whose alwaysUpdated property is false does not need to exist
and is therefore not required to have a valid timestamp.
Change-Id: I642349c49a53e6e45d6b09d1acc87f4c9a0edae9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I745a07a3b25abd6c89afcd3b2199119a751e8a0c
|
| |
| |
| |
| |
| |
| |
| |
| | |
If safeConnect() returns false, we must not add that "child" to the list
of children added by scanners.
Change-Id: Icbb1b2d14d99f002e2370ee2bda25daafb0398b2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Use nullptr instead of 0.
Change-Id: Id5b7933844730e244a2dcf3fcebf24f9f048047f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Use more auto.
Change-Id: I27e1e2345c6bede459a375663be72ec3370a5e39
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commands can now be assigned to an arbitrary job pool and a limit for
the number of concurrently running jobs in such pools can be provided in
a number of ways:
- via the build command line: qbs --job-limits linker:1
- via the settings: qbs config preferences.jobLimit.linker 1
- in a project file: JobLimit {
jobPool: "linker";
jobCount: 1
}
We provide two job pools ourselves with the cpp module: "compiler" and
"linker".
[ChangeLog] Added the concept of job pools for limiting concurrent
execution of commands by type
Task-number: QBS-743
Change-Id: Ib3f361dbc73093e342bf0eba0daf2079a2b3a8ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After removing generated artifacts, we check whether the respective
parent directory is now empty, and if it is, we remove it to keep the
build directory tidy.
However, we cannot do that right away as part of rule application,
because concurrently running processes of other rules might access that
directory. Therefore, we delay the directory removal step until the
Executor has finished.
Change-Id: If996e231aa34bc487bcd179d8fc7f49678519b00
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old code had a number of problems:
- It partially overlapped with the calculation of compatible inputs.
- It was wrong in that it failed to consider inputs from dependencies.
- It was wrong in that it assumed that after rule application, input
artifacts always have parent artifacts to later compare timestamps with.
This is not the case for e.g. a generated cpp file without a Q_OBJECT
macro on which moc is run: No transformer is created in such a case,
because the outputArtifacts array is empty.
The last problem was glossed over by the fact that we held a global list
of "changed source artifacts" in the executor, so such changes were
spotted when they happened in source artifacts. However, that code was
also rather dubious in itself because the criterion for "changed" was
that the timestamp was newer than it was on the last run of the
executor, so I don't think it was completely safe when doing partial
builds.
We solve these problems by remembering when we last applied the rule. An
input artifact is considered "changed" if it has been modified after
that.
Change-Id: Ib1bafd9e1078122776626155c4f2cc11ad622191
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Having all the related code in one place makes it much easier to
understand what is going on, and the Executor code is completely
straightforward now.
Change-Id: I0c8b2d0edafa69ad326f6afbb0ab1202fef9d885
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old code did that only upon output artifact creation, which meant
that source artifacts that became inputs to a rule that had already run
were not added to that rule node as a child.
Change-Id: I4998cbc54abbbcbf0cb2feafd34f2ee44d6d329d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... instead of doing it again for every artifact. Typically, artifacts
share a lot of file dependencies (e.g. external header files). The old
code retrieved such timestamps over and over again during the same
build.
Change-Id: I100287eff93792adcc4b10847173081809439cac
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The naming of these sets and the code that handled them in the Executor
suggested that they could contain other types of nodes as well.
Change-Id: I6443f07a3615eff166965a5203002797200924b0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I056a96c062881c2a07ec15b1803efa9c9aa1a02a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Resetting the timestamps of file dependencies happens per artifact
before the rescue procedure, so any dependencies added there must get
their timestamp reset explicitly.
Task-number: QBS-1359
Change-Id: Iec22b105a4132ada65b52391d4212c3b9ba52a2a
Reviewed-by: Ola Røer Thorsen <ola@silentwings.no>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The information about which input artifacts changed is only relevant to
the code in RuleNode, so let's set it up there.
Change-Id: I4be762f91583a77f083b26abb5882c60cb6ead86
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I616949b321c26699ada0f2ae81b20a88db40b610
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before:
qbs.exec: adding leaf "RULE [c_pch][c_pch_src] [test] located at F:\\Projects\\qt-creator\\build-qtc\\share\\qtcreator\\qbs\\share\\qbs\\modules\\cpp\\GenericGCC.qbs:616:18"
After:
qbs.exec: adding leaf RULE [c_pch][c_pch_src] [test] located at F:\Projects\qt-creator\build-qtc\share\qtcreator\qbs\share\qbs\modules\cpp\GenericGCC.qbs:616:18
Change-Id: Ia1bcc197b9ce71934febbde7515b5d71d3cde0db
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|/
|
|
|
|
|
| |
That's a better fit.
Change-Id: I3eff4ce461342b2966196da4e9aeff35544a38c4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
| |
The value_type ChildData is not suitable for QList.
Change-Id: I33057a739c26e36a7c6dabc44dad72262a05cdb0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
| |
This fixes the following warnings:
executor.cpp(832): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
executor.cpp(832): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
Change-Id: Ic23b855b8213a7b4feee81553233ad882a6c8ed2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a former child artifact is not in the list anymore after the rules
applicator has run and it was not originally added as a result of
scanning, then it is no longer a child artifact.
We used to add these artifacts back to the list of children, so that an
existing parent/child connection persisted even after changing the rule
input tags in a way that the child would not match anymore.
Change-Id: I700f515bbe5732bdb9251d48e3fc5ad53fb181cc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
... after a transformer finishes. This makes our "out of date" check
independent of the local clock resolution for generated artifacts that
do not have source artifacts as children.
Change-Id: If3d47f1fd859c30846806fabaddf3b47a840a6d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
| |
The value_type is not suitable for QList.
Change-Id: If72af8998e9e1da37c8451bc6dc5925079be43dd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I67bac50beea4efb572b3299137ef52dc725647ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
| |
... by sorting some data structures.
Change-Id: I59b0244d9e489e2d4445846f6a8c796e603837c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This property did not only exclude auxiliary inputs, but all kinds of
inputs ("inputs", "auxiliaryInputs", "explicitlyDependsOn"), which
happens to be what we want, as it does not appear to make any sense to
exclude only tags from one of the relevant "input-like" properties.
But the behavior was inconsistent: When building the (product-local)
rule graph, the property was considered, but not when collecting
artifacts from other products during rule application. This is now
fixed.
[ChangeLog] The excludedAuxiliaryInputs property of the Rule item has
been renamed to excludedInputs. The old name is deprecated.
Change-Id: Id7eae3461a6e85f53b3d47750d296c3e47a18a95
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The product variable gets a new property "exports" that provides
a "dependencies" array as well as property values the same way
that the product variable itself does, but for exported dependencies
and properties, respectively. In addition, meta data about these
properties is provided via a "properties" array, and structural
information can be retrieved via "childItems".
This data is intended to be used by modules creating interface
files from products.
Task-number: QBS-268
Change-Id: I2bb106e1ca1b18abbd6fe60411bc81bda9ee35e7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
It is wrong to always run the transformer in that case. If any of these
outputs are up to date, then it must not be re-run.
Change-Id: Ia79fba235d8829aad1d41c2c4288cc57d89434cc
Reviewed-by: Ola Røer Thorsen <ola@silentwings.no>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
| |
... and take the data into account when deciding whether to
re-run rules and commands.
Change-Id: Ib0f733028617eaa91cbf902c5537f30375900646
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The checks that determine whether to re-run prepare scripts and/or
commands due to property or environment changes do not belong into the
build graph loader. Instead, we now do them on demand during the build
process. Advantages:
- The code is at its "natural" place, making it easier to understand
and less fragile.
- There are a lot fewer unnecessary build data invalidations, speeding
up both re-resolving and rebuilding in case only some rules/commands
have changed.
- Re-running commands due to property or environment changes no longer
implies re-running prepare scripts.
- We now catch property changes on generated artifacts, which was not
possible before, because the build graph loader only had access to
the source artifacts of the re-resolved project.
Change-Id: I36b022cf631fa9e8293feec4d6f416c2686539c1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
| |
Mainly to streamline the serialization calls.
Change-Id: Ia54d51a193b2db52dab66d36e526f8516c15f20a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|\
| |
| |
| | |
Change-Id: Id4986b2170ac13bf8931656659f6f60432cdbe8d
|
| |\
| | |
| | |
| | | |
Change-Id: I2d6cac6f24144c2c7e463ef7eed2e2c109f50bbf
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
After adding an external file dependency, we would never remove it from
the global list again, meaning the look-up table would contain stale
entries if an external header file was moved around. Because we still
checked the status of the artifact-local list of dependencies, the
result was that in such a situation, the files including such a header
would get recompiled on every build.
[ChangeLog] Fixed constant rebuilding after moving an external header
file.
Task-number: QBS-1285
Change-Id: Id764da7485dd540f2ff64bcd890e43723f18e6cd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We added change tracking for the elements of the array in 898d09d479,
but the array itself was not covered.
Change-Id: I7d4083e8bf77f52e1f4a3b5da85ba13cf52fe750
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
|/ /
| |
| |
| |
| | |
Change-Id: I25ec97e64522d7fa486fcf408d8134cbbd8b24ea
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Such files are not to be matched against Rule.inputs. This part was
forgotten in 8ca922793f.
Change-Id: I0a01b3642f4a16c09d189e8c2228205fd0e9962b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is helpful to print a list of unbuilt products after a failed build,
but putting each one on a line of its own takes up too much space for
larger projects, potentially scrolling the actual error message(s) out
of view.
Put the product names on one line instead. Also sort them, so users can
easily look for a specific product.
Change-Id: Ib21b987196350264462940dade2f6af2625a2e81
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
According to our benchmarker, this speeds up rule execution by three per
cent.
Change-Id: Iaf146ba6073b897d19e0fe470d7b0dc4a04d264c
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|