aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/derivation-goal.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-08-30 19:01:30 +0200
committereldritch horrors <pennae@lix.systems>2024-08-30 19:01:30 +0200
commitc2b90d235fb5dd721898d8d41d73a51607654890 (patch)
tree91c0ebd6a1a0e3fc1d11100cef3088133363b6a9 /src/libstore/build/derivation-goal.cc
parente55ec75619b775bf0f5dd60e3da8de9bc8235f68 (diff)
libstore: don't ContinueImmediately where we can tail call
there's no reason to go through the event loop in these cases. returning ContinueImmediately here is just a very convoluted way of jumping to the state we've just set after unwinding one frame of the stack, which never matters in the cases changed here because there are no live RAII guards. Change-Id: I7c00948c22e3caf35e934c1a14ffd2d40efc5547
Diffstat (limited to 'src/libstore/build/derivation-goal.cc')
-rw-r--r--src/libstore/build/derivation-goal.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index a75a674d1..1dda1b1b4 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -649,7 +649,7 @@ Goal::WorkResult DerivationGoal::inputsRealised(bool inBuildSlot)
slot to become available, since we don't need one if there is a
build hook. */
state = &DerivationGoal::tryToBuild;
- return ContinueImmediately{};
+ return tryToBuild(inBuildSlot);
}
void DerivationGoal::started()
@@ -772,7 +772,7 @@ Goal::WorkResult DerivationGoal::tryToBuild(bool inBuildSlot)
actLock.reset();
state = &DerivationGoal::tryLocalBuild;
- return ContinueImmediately{};
+ return tryLocalBuild(inBuildSlot);
}
Goal::WorkResult DerivationGoal::tryLocalBuild(bool inBuildSlot) {