Cargo should provide --remap-path-prefix or not hash it from RUSTFLAGS. #6914
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
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 wholeRUSTFLAGS
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 ofRUSTFLAGS
, before hashing the rest, but that seems perhaps a bit brittle.cc @michaelwoerister @Eh2406
The text was updated successfully, but these errors were encountered: