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:
@@ -59,6 +59,13 @@ out of scope is closed with the reason.
|
||||
compiler, because the client's Lua is vendored and built from source. On macOS the Xcode
|
||||
command line tools, which also supply libclang for the audio bindings; on Linux the ALSA and
|
||||
udev development packages and pkg-config. `python3` runs two of the gates.
|
||||
- **A build cache (optional).** [`sccache`](https://github.com/mozilla/sccache) serves a dependency
|
||||
rebuild after a branch switch or a `git clean` from cache instead of recompiling it.
|
||||
`scripts/check.sh`, `scripts/gates.sh` and `scripts/smoke.sh` use it automatically when it is on
|
||||
`PATH`; for the play loop, `. scripts/sccache.sh && cargo play`, or `scripts/sccache.sh cargo
|
||||
play`, wraps one command. Without it a clone builds exactly as before; an existing `RUSTC_WRAPPER`
|
||||
wins and `BENILLA_NO_SCCACHE=1` skips it. It does not wrap the C compiler, so the vendored Lua
|
||||
build is not cached by it.
|
||||
- **A 1.12.1 install of your own.** `WOW_DATA=<its Data folder>`, or a `WoW` link at the repo
|
||||
root, which only a dev build sees: the player build looks for `Data/` or `WoW/Data/` beside
|
||||
the binary. benilla reads the install and never writes into it. `WOW_DATA=` (set, empty)
|
||||
|
||||
Reference in New Issue
Block a user