aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-02-01 14:06:26 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-03-07 16:34:40 +0000
commit4d22a69b8c82c5f1e4cc746a95afc43be7e66893 (patch)
tree968686bf543cc1940486815197a4ac4c6b79c941 /src
parent554fa59f6cc821e959c312b336559c0dd23cc616 (diff)
Match a rule's input tags against root artifacts of dependencies
For instance, if you make an object file the target artifact of your product, you want the depending product's linker rule to pick it up, without the need to explicitly add the tag to "inputsFromDependencies". Otherwise, you'd basically have to duplicate the contents of "inputs" in all rules then, which is silly. [ChangeLog] A rule's "inputs" property is now matched against the file tags of target artifacts of products that the current product depends on, in addition to artifacts in the current product. Change-Id: I814cb49f5d8135b7482777dce73f1fa56a44724b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/lib/corelib/buildgraph/rulenode.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/corelib/buildgraph/rulenode.cpp b/src/lib/corelib/buildgraph/rulenode.cpp
index a9c547490..1959c07d9 100644
--- a/src/lib/corelib/buildgraph/rulenode.cpp
+++ b/src/lib/corelib/buildgraph/rulenode.cpp
@@ -173,11 +173,12 @@ ArtifactSet RuleNode::currentInputArtifacts() const
for (const ResolvedProductConstPtr &dep : qAsConst(product->dependencies)) {
if (!dep->buildData)
continue;
- if (m_rule->inputsFromDependencies.isEmpty())
- continue;
for (Artifact * const a : filterByType<Artifact>(dep->buildData->nodes)) {
- if (a->fileTags().intersects(m_rule->inputsFromDependencies))
+ if (a->fileTags().intersects(m_rule->inputsFromDependencies)
+ || (dep->buildData->roots.contains(a)
+ && a->fileTags().intersects(m_rule->inputs))) {
s += a;
+ }
}
}