Commit 1aa03ee
exe-scroll: per-target zig cache dir for reproducible cross builds
Prompt: is the zig build for exe-scroll reproducible? / Can we make it so
that we use a different cache directory
Zig's local .zig-cache isn't fully partitioned by -Dtarget, so building
both arches back-to-back through one checkout produced a non-reproducible
second binary (its .text differed ~48 bytes from a clean build).
Point 'zig build' at a per-target cache dir (.zig-cache/<triple>, still
gitignored, overridable via CACHE_DIR). Each arch now builds byte-identical
to its clean build regardless of order. Verified amd64->arm64 and
arm64->amd64 both reproduce the clean-build hashes.
Co-authored-by: Shelley <shelley@exe.dev>1 parent 76866bb commit 1aa03ee
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| 92 | + | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
| |||
0 commit comments