You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling to a custom target based on a JSON target spec, Cargo seems to hash the full pathname of the JSON target spec into its metadata hash. This makes it very difficult to reproduce these builds on different machines with different filesystem layouts.
Ideally builds could be reproducible no matter what the full pathname is of the JSON target spec.
Steps
cargo new path-repro
cd path-repro
for i in a b
do
mkdir $i
rustc --print=target-spec-json -Z unstable-options |grep -v is-builtin > $i/x86_64-unknown-linux-gnu.json
cargo +nightly rustc --release --target-dir=build-$i --target=$i/x86_64-unknown-linux-gnu.json -Z build-std -- --emit=asm
done
diff -u build-?/*/release/deps/path_repro*.s
Problem
When compiling to a custom target based on a JSON target spec, Cargo seems to hash the full pathname of the JSON target spec into its metadata hash. This makes it very difficult to reproduce these builds on different machines with different filesystem layouts.
Ideally builds could be reproducible no matter what the full pathname is of the JSON target spec.
Steps
Possible Solution(s)
I think this should be fixed by #10746
Notes
No response
Version
The text was updated successfully, but these errors were encountered: