Open
Description
In #128456 (comment) we noticed that:
--crate-type=rlib
+ -C debuginfo=2
+ -Z remap-cwd-prefix=.
on Windows caused the rlib to be unreproducible.
rust/tests/run-make/reproducible-build/Makefile
Lines 4 to 5 in 0f442e2
Two source files:
- https://github.com/rust-lang/rust/blob/0ba9db87e61adcfd9a978188f61c20d9b423a099/tests/run-make/reproducible-build/reproducible-build-aux.rs
- https://github.com/rust-lang/rust/blob/0ba9db87e61adcfd9a978188f61c20d9b423a099/tests/run-make/reproducible-build/reproducible-build.rs
Steps:
- Let "root" test directory be called
$base_dir
. rustc reproducible-build-aux.rs
mkdir test
cp reproducible-build.rs test/reproducible-build.rs
- compiler 1:
rustc --crate-type=rlib -C debuginfo=2 -Zremap-cwd-prefix=. -L $cwd reproducible-build.rs
mv libreproducible_build.rlib libfoo.rlib
cd test
- compiler 2:
rustc --crate-type=rlib -C debuginfo=2 -Zremap-cwd-prefix=. -L $base_dir --out-dir=$base_dir reproducible-build.rs
cd $base_dir
- check if
libreproducible_build.rlib
andlibfoo.rlib
are different
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=.
.
Metadata
Metadata
Assignees
Labels
Area: Reproducible / deterministic buildsArea: The testsuite used to check the correctness of rustcCategory: This is a bug.Operating system: WindowsStatus: This issue has no reproduction and needs a reproduction to make progress.Relevant to the compiler team, which will review and decide on the PR/issue.