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
This commit updates how `-Cmetadata` is calculated for each unit to
optionally exclude the `host: ...` line that rustc prints for
cross-compiled builds. Previously the full `verbose_version` was hashed
for stable builds and the `host` was explicitly hashed for non-stable
builds. For a build using `--target`, however, that means that the
`-Cmetadata` will be different when producing the same target on
different hosts (e.g. producing the binary once on Linux and once on
macOS).
This can hinder reproduction of a binary across different platforms even
when the `--target` flag is used. For example in rust-lang/rust#117597
it was seen that a WebAssembly binary produced on different platforms
was slightly different and this appears due to the differing
`-Cmetadata` flags. After this commit the `-Cmetadata` flag is the same
for two different platforms meaning that different platforms produce the
same binary.
I've tested locally and a simple project produces a different binary
before this change but produces the same binary on two platforms after
this change. Unfortunately automated testing of this change will be
difficult since it requires two different host compilers, though.
0 commit comments