diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-31 17:41:04 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-08-01 11:38:28 +0000 |
commit | b9db9d860edee00280c46c5db51954c9db28a4ee (patch) | |
tree | d67fa066b5f589f3cf307231420da80a299c5491 /src/lib/corelib/buildgraph/rulesapplicator.cpp | |
parent | 872a4d75dca98c1692fb1f03fa69bd31bc018bd8 (diff) |
RuleNode: Keep track of "helper inputs"
Namely, explicitlyDependsOn and auxiliaryInputs. A change in the set of
explicitlyDependsOn must cause rule re-application (see c241048e30).
In addition, for "I/O rules" (see 2d1de8cc84), we re-apply on filestamp
changes to explicitlyDependsOn and any changes to auxiliaryInputs.
Change-Id: Ic1770ab37b0609b0d58e7bbc6c1c755dec262a19
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 | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp index 7878eb45c..240514001 100644 --- a/src/lib/corelib/buildgraph/rulesapplicator.cpp +++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp @@ -93,7 +93,8 @@ RulesApplicator::~RulesApplicator() delete m_mocScanner; } -void RulesApplicator::applyRule(RuleNode *ruleNode, const ArtifactSet &inputArtifacts) +void RulesApplicator::applyRule(RuleNode *ruleNode, const ArtifactSet &inputArtifacts, + const ArtifactSet &explicitlyDependsOn) { m_ruleNode = ruleNode; m_rule = ruleNode->rule(); @@ -103,6 +104,7 @@ void RulesApplicator::applyRule(RuleNode *ruleNode, const ArtifactSet &inputArti m_createdArtifacts.clear(); m_invalidatedArtifacts.clear(); m_removedArtifacts.clear(); + m_explicitlyDependsOn = explicitlyDependsOn; RulesEvaluationContext::Scope s(evalContext().get()); m_completeInputSet = inputArtifacts; @@ -190,7 +192,7 @@ void RulesApplicator::doApply(const ArtifactSet &inputArtifacts, QScriptValue &p m_transformer = Transformer::create(); m_transformer->rule = m_rule; m_transformer->inputs = inputArtifacts; - m_transformer->explicitlyDependsOn = collectExplicitlyDependsOn(); + m_transformer->explicitlyDependsOn = m_explicitlyDependsOn; m_transformer->alwaysRun = m_rule->alwaysRun; m_oldTransformer.reset(); @@ -363,13 +365,13 @@ ArtifactSet RulesApplicator::collectAdditionalInputs(const FileTags &tags, const return artifacts; } -ArtifactSet RulesApplicator::collectExplicitlyDependsOn() +ArtifactSet RulesApplicator::collectExplicitlyDependsOn(const Rule *rule, + const ResolvedProduct *product) { ArtifactSet first = collectAdditionalInputs( - m_rule->explicitlyDependsOn, m_rule.get(), m_product.get(), CurrentProduct); + rule->explicitlyDependsOn, rule, product, CurrentProduct); ArtifactSet second = collectAdditionalInputs( - m_rule->explicitlyDependsOnFromDependencies, m_rule.get(), m_product.get(), - Dependencies); + rule->explicitlyDependsOnFromDependencies, rule, product, Dependencies); return first.unite(second); } |