diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-06 12:52:22 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-10 10:28:11 +0000 |
commit | 6a131f01caa78e8cece0d5a48fce10915500f40f (patch) | |
tree | 0136fb764d8453830454eb7d992294f168c9ad9e /src/lib/corelib/buildgraph/executor.cpp | |
parent | f908e615d367a6bf7fde29e877be72b6fee1ef34 (diff) |
Executor: Move some code into RuleNode
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>
Diffstat (limited to 'src/lib/corelib/buildgraph/executor.cpp')
-rw-r--r-- | src/lib/corelib/buildgraph/executor.cpp | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp index 58f7b76bb..13b21d40e 100644 --- a/src/lib/corelib/buildgraph/executor.cpp +++ b/src/lib/corelib/buildgraph/executor.cpp @@ -487,37 +487,10 @@ void Executor::executeRuleNode(RuleNode *ruleNode) return; QBS_CHECK(!m_evalContext->engine()->isActive()); - ArtifactSet changedInputArtifacts; - if (ruleNode->rule()->isDynamic()) { - for (Artifact * const artifact : qAsConst(m_changedSourceArtifacts)) { - if (artifact->product != ruleNode->product) - continue; - if (artifact->isTargetOfModule()) - continue; - if (ruleNode->rule()->acceptsAsInput(artifact)) - changedInputArtifacts += artifact; - } - for (Artifact *artifact : filterByType<Artifact>(ruleNode->product->buildData->allNodes())) { - if (artifact->artifactType == Artifact::SourceFile) - continue; - if (ruleNode->rule()->acceptsAsInput(artifact)) { - for (const Artifact * const parent : artifact->parentArtifacts()) { - if (parent->transformer->rule != ruleNode->rule()) - continue; - if (!parent->alwaysUpdated) - continue; - if (parent->timestamp() < artifact->timestamp()) { - changedInputArtifacts += artifact; - break; - } - } - } - } - } RuleNode::ApplicationResult result; - ruleNode->apply(m_logger, changedInputArtifacts, m_productsByName, m_projectsByName, &result); - + ruleNode->apply(m_logger, m_changedSourceArtifacts, m_productsByName, m_projectsByName, + &result); if (result.upToDate) { qCDebug(lcExec).noquote() << ruleNode->toString() << "is up to date. Skipping."; } else { |