diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-06-22 15:40:01 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-05 09:02:52 +0000 |
commit | 768fc9c72e69f6a0843635bf71910c497d9f23ec (patch) | |
tree | 76f93222b2260b70c3bce7b0965a571f31a1aac5 /src/lib/corelib/buildgraph/rulesapplicator.cpp | |
parent | 3523be5d90a2502540a99ca2b57e28da41476b76 (diff) |
Do not reset the product build data due to source file metadata changes
It is not necessary to throw away and recreate all the product's
artifacts and rule nodes if a source file's tags or properties change.
Instead, just copy the new data into the corresponding Artifact object.
As a necessary side effect, we also handle changes to the product-
level module properties and to "fileTagsFilter groups" in a more fine-
grained manner by resetting the properties and file tags of the
product's Artifact objects that represent generated artifacts.
This is part of a long-term effort to eliminate the build graph's
"shadow structure" aka RescuableArtifactData.
The next step will deal with added and removed source files.
Change-Id: I054fa18d7920ea5c429c92bfca1c12e34192211e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/rulesapplicator.cpp')
-rw-r--r-- | src/lib/corelib/buildgraph/rulesapplicator.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp index 0b65e6338..5c5f3a60e 100644 --- a/src/lib/corelib/buildgraph/rulesapplicator.cpp +++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp @@ -439,22 +439,8 @@ Artifact *RulesApplicator::createOutputArtifact(const QString &filePath, const F } outputArtifact->alwaysUpdated = alwaysUpdated; - outputArtifact->properties = m_product->moduleProperties; - - FileTags outputArtifactFileTags = fileTags.empty() - ? m_product->fileTagsForFileName(outputArtifact->fileName()) : fileTags; - for (const ArtifactPropertiesConstPtr &props : m_product->artifactProperties) { - if (outputArtifactFileTags.intersects(props->fileTagsFilter())) { - outputArtifact->properties = props->propertyMap(); - outputArtifactFileTags += props->extraFileTags(); - break; - } - } - outputArtifact->setFileTags(outputArtifactFileTags); - - // Let a positive value of qbs.install imply the file tag "installable". - if (outputArtifact->properties->qbsPropertyValue(StringConstants::installProperty()).toBool()) - outputArtifact->addFileTag("installable"); + outputArtifact->pureFileTags = fileTags; + provideFullFileTagsAndProperties(outputArtifact); for (Artifact * const inputArtifact : inputArtifacts) { QBS_CHECK(outputArtifact != inputArtifact); |