build: scripts/sccache.sh wraps rustc when sccache is installed, and the gates source it
A build cache serves a dependency rebuild after a branch switch or a `git clean` instead of recompiling it, which is most of what the in-loop verify spends. It stays a convenience and never a requirement: with nothing on `PATH` nothing is exported and a clone needs only stable Rust and a C compiler, exactly as before. `check.sh`, `gates.sh` and `smoke.sh` source it, so the loops pick it up without being asked and a machine that would rather not have it sets `BENILLA_NO_SCCACHE=1`. An existing `RUSTC_WRAPPER` wins. Only rustc is wrapped — the vendored Lua build wants its own `CC="sccache cc"`, so it is not cached by this.
This commit is contained in:
@@ -18,6 +18,9 @@ here="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
|
||||
[ -n "$root" ] && [ -f "$root/scripts/gates.sh" ] || root="$here"
|
||||
cd "$root" || exit 1
|
||||
|
||||
# sccache, when installed, caches the builds below; opt out with BENILLA_NO_SCCACHE=1.
|
||||
. "$root/scripts/sccache.sh"
|
||||
echo "gating: $root"
|
||||
|
||||
# ── Green-stamp memoization ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user