-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Open
Labels
A-reproducibilityArea: Reproducible / deterministic buildsArea: Reproducible / deterministic buildsA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.O-windowsOperating system: WindowsOperating system: WindowsS-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.Status: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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
| # ignore-musl | |
| # Objects are reproducible but their path is not. |
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.rsmkdir testcp 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.rlibcd 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.rlibandlibfoo.rlibare 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
A-reproducibilityArea: Reproducible / deterministic buildsArea: Reproducible / deterministic buildsA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.O-windowsOperating system: WindowsOperating system: WindowsS-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.Status: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.