Closed
Description
After #6503, reproducible build setups that were setting RUSTFLAGS="--remap-path-prefix=..."
in order to normalize paths in rustc, stopped being reproducible, as Cargo is now hashing the whole RUSTFLAGS
value, resulting in different -C metadata
values.
This was originally reported in rust-lang/rust#59542, and one of the solutions suggested there was that Cargo should provide its own --remap-path-prefix
, which would not be hashed, and that becomes the supported way set this flag.
Another possibility could be Cargo parsing --remap-path-prefix
out of RUSTFLAGS
, before hashing the rest, but that seems perhaps a bit brittle.