diff options
author | Artemis Tosini <me@artem.ist> | 2024-07-07 18:06:08 +0000 |
---|---|---|
committer | Artemis Tosini <me@artem.ist> | 2024-07-07 18:06:08 +0000 |
commit | d461cc1d7b2f489c3886f147166ba5b5e0e37541 (patch) | |
tree | de58b03389fda19903ba74ebafee9e3cca321df5 /src/libstore/build | |
parent | 55a32f24d3285c0b4f6866e16a4c8aeac6345c02 (diff) |
libstore: make LocalDerivationGoal::needsHashRewrite virtual
This rather simple function existed just to check some flags,
but the response varies by platform. This is a perfect case for
our subclasses.
Change-Id: Ieb1732a8d024019236e0d0028ad843a24ec3dc59
Diffstat (limited to 'src/libstore/build')
-rw-r--r-- | src/libstore/build/local-derivation-goal.cc | 7 | ||||
-rw-r--r-- | src/libstore/build/local-derivation-goal.hh | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index 6a298e6eb..d523ef51f 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -117,14 +117,9 @@ LocalDerivationGoal::~LocalDerivationGoal() noexcept(false) } -inline bool LocalDerivationGoal::needsHashRewrite() +bool LocalDerivationGoal::needsHashRewrite() { -#if __linux__ return !useChroot; -#else - /* Darwin requires hash rewriting even when sandboxing is enabled. */ - return true; -#endif } diff --git a/src/libstore/build/local-derivation-goal.hh b/src/libstore/build/local-derivation-goal.hh index 727a7f406..4ac18b974 100644 --- a/src/libstore/build/local-derivation-goal.hh +++ b/src/libstore/build/local-derivation-goal.hh @@ -206,7 +206,7 @@ struct LocalDerivationGoal : public DerivationGoal /** * Whether we need to perform hash rewriting if there are valid output paths. */ - bool needsHashRewrite(); + virtual bool needsHashRewrite(); /** * The additional states. |