--crate-type=rlib + -Cdebuginfo=2 + -Zremap-cwd-prefix=. is not reproducible on Windows (original) (raw)

In #128456 (comment) we noticed that:

--crate-type=rlib + -C debuginfo=2 + -Z remap-cwd-prefix=. on Windows caused the rlib to be unreproducible.

# ignore-musl
# Objects are reproducible but their path is not.

Two source files:

  1. https://github.com/rust-lang/rust/blob/0ba9db87e61adcfd9a978188f61c20d9b423a099/tests/run-make/reproducible-build/reproducible-build-aux.rs
  2. https://github.com/rust-lang/rust/blob/0ba9db87e61adcfd9a978188f61c20d9b423a099/tests/run-make/reproducible-build/reproducible-build.rs

Steps:

Marking as S-needs-repro as I'm not sure of the root cause or exact reproduction environment; the test case failed on x86_64-msvc ci job. I'm also not exactly sure of the intended semantics of -Z remap-cwd-prefix=..