aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/executor.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-07-12 13:30:46 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-07-13 06:19:11 +0000
commitfacd941064fbdad2a89ddc557e6540a2869a962f (patch)
tree222ab07e9670ed3a43288e80aad6386082a09276 /src/lib/corelib/buildgraph/executor.cpp
parent3393c9fbb834750f9437e6fef42482602d307a0f (diff)
Executor: Move rule-specific code to RulesApplicator
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>
Diffstat (limited to 'src/lib/corelib/buildgraph/executor.cpp')
-rw-r--r--src/lib/corelib/buildgraph/executor.cpp27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp
index 3adf65e8a..d58f50f17 100644
--- a/src/lib/corelib/buildgraph/executor.cpp
+++ b/src/lib/corelib/buildgraph/executor.cpp
@@ -487,31 +487,8 @@ void Executor::executeRuleNode(RuleNode *ruleNode)
RuleNode::ApplicationResult 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 {
- qCDebug(lcExec).noquote() << ruleNode->toString();
- const WeakPointer<ResolvedProduct> &product = ruleNode->product;
- Set<RuleNode *> parentRules;
- if (!result.createdArtifacts.empty()) {
- for (BuildGraphNode *parent : qAsConst(ruleNode->parents)) {
- if (parent->type() == BuildGraphNode::RuleNodeType)
- parentRules += static_cast<RuleNode *>(parent);
- }
- }
- for (BuildGraphNode *node : qAsConst(result.createdArtifacts)) {
- qCDebug(lcExec).noquote() << "rule created" << node->toString();
- Internal::connect(node, ruleNode);
- QBS_CHECK(node->type() == BuildGraphNode::ArtifactNodeType);
- Artifact * const outputArtifact = static_cast<Artifact *>(node);
- if (outputArtifact->fileTags().intersects(product->fileTags))
- product->buildData->addRootNode(outputArtifact);
- for (RuleNode *parentRule : qAsConst(parentRules))
- Internal::connect(parentRule, outputArtifact);
- }
- updateLeaves(result.createdArtifacts);
- updateLeaves(result.invalidatedArtifacts);
- }
+ updateLeaves(result.createdArtifacts);
+ updateLeaves(result.invalidatedArtifacts);
finishNode(ruleNode);
if (m_progressObserver)
m_progressObserver->incrementProgressValue();