Repository: rust
Issue: Tracking Issue for Reproducible Build bugs and challenges
Labels: A-debuginfo,A-diagnostics,T-compiler,T-bootstrap,T-infra,C-tracking-issue,A-reproducibility,D-diagnostic-infra,S-tracking-forever

This is a tracking issue for collecting and triaging bugs and challenges that hinder our ability to produce [reproducible and deterministic builds](https://reproducible-builds.org).

This tracking issue is used as a hub for connecting to other relevant issues, e.g., bugs or open design questions. This tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the https://github.com/rust-lang/rust/labels/A-reproducibility label, and tag with OS/architecture/target labels as suitable.

This tracking issue is unlikely to be *exhaustive*. Please add suitable entries and edit as new issues and PRs pop up or if old issues and PRs are rediscovered.

<details>
<summary>Copy pastas for the inline labels</summary>

https://github.com/rust-lang/rust/labels/A-debuginfo
https://github.com/rust-lang/rust/labels/A-diagnostics
https://github.com/rust-lang/rust/labels/A-LLVM
https://github.com/rust-lang/rust/labels/A-reproducibility
https://github.com/rust-lang/rust/labels/A-run-make
https://github.com/rust-lang/rust/labels/A-testsuite
https://github.com/rust-lang/rust/labels/C-tracking-issue
https://github.com/rust-lang/rust/labels/F-trim-paths
https://github.com/rust-lang/rust/labels/T-bootstrap
https://github.com/rust-lang/rust/labels/T-cargo
https://github.com/rust-lang/rust/labels/T-compiler
https://github.com/rust-lang/rust/labels/T-lang
https://github.com/rust-lang/rust/labels/T-libs
https://github.com/rust-lang/rust/labels/T-libs-api
https://github.com/rust-lang/rust/labels/T-infra
https://github.com/rust-lang/rust/labels/T-rustdoc
https://github.com/rust-lang/rust/labels/O-wasm
https://github.com/rust-lang/rust/labels/O-windows
https://github.com/rust-lang/rust/labels/O-windows-msvc
https://github.com/rust-lang/rust/labels/O-windows-gnu
https://github.com/rust-lang/rust/labels/O-macos
https://github.com/rust-lang/rust/labels/O-apple
https://github.com/rust-lang/rust/labels/O-AArch64
https://github.com/rust-lang/rust/labels/O-x86_64

</details>

## Bugs and issues

- [ ] `tests/run-make/reproducible-builds` (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-testsuite, https://github.com/rust-lang/rust/labels/A-run-make; several skipped combinations due to unreproducibility)
- [ ] https://github.com/rust-lang/rust/issues/82188 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/O-windows-msvc; needs further investigation)
- [ ] https://github.com/rust-lang/rust/issues/18370 (https://github.com/rust-lang/rust/labels/T-rustdoc; status unclear)
- [ ] https://github.com/rust-lang/rust/issues/38550 (https://github.com/rust-lang/rust/labels/T-compiler; related to `-Z randomize-layout`, status unclear)
- [ ] https://github.com/rust-lang/rust/issues/66251 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-diagnostics, `--remap-path-prefix`; sysroot handling in diagnostics)
- [ ] https://github.com/rust-lang/rust/issues/69060 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-LLVM, perf; unclear what's to do here)
- [ ] https://github.com/rust-lang/rust/issues/69352 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-LLVM; possible non-determinism in LLVM)
- [ ] https://github.com/rust-lang/rust/issues/73501 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-testsuite, https://github.com/rust-lang/rust/labels/A-mir-opt; unsure how to repro/debug)
- [ ] https://github.com/rust-lang/rust/issues/73932 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-linkage; Stable Version Hashes)
- [ ] https://github.com/rust-lang/rust/issues/74786 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-testsuite; `--remap-path-prefix`)
- [ ] https://github.com/rust-lang/rust/issues/75887 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-macros; macro expansions with deps on external files)
- [ ] https://github.com/rust-lang/rust/issues/89911 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-debuginfo; `-Cdebuginfo=2`)
- [ ] https://github.com/rust-lang/rust/issues/88982 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-debuginfo, https://github.com/rust-lang/rust/labels/A-linkage, https://github.com/rust-lang/rust/labels/O-windows; affects `tests/run-make/reproducible-builds`, bin, `--remap-path-prefix`, `-Z remap-cwd-prefix`)
- [ ] https://github.com/rust-lang/rust/issues/129117 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-testsuite, https://github.com/rust-lang/rust/labels/A-run-make; `-Cdebuginfo=2`, `-Z remap-cwd-prefix=.`, rlib)

Tracking/meta issues:

- [ ] https://github.com/rust-lang/rust/issues/75362 (https://github.com/rust-lang/rust/labels/T-infra)
- [ ] https://github.com/rust-lang/rust/issues/65042 (https://github.com/rust-lang/rust/labels/T-compiler)
- [ ] https://github.com/rust-lang/rust/issues/84232 (https://github.com/rust-lang/rust/labels/T-compiler)
- [ ] https://github.com/rust-lang/rust/issues/111540 (https://github.com/rust-lang/rust/labels/C-tracking-issue)
- [ ] https://github.com/rust-lang/rust/issues/89434 (https://github.com/rust-lang/rust/labels/C-tracking-issue)

Resolved:

- [x] https://github.com/rust-lang/rust/issues/66568 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-debuginfo; `-Cdebuginfo=2`)
- [x] https://github.com/rust-lang/rust/issues/47086 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-debuginfo; `-Cdebuginfo=2`)
- [x] https://github.com/rust-lang/rust/issues/24473 (https://github.com/rust-lang/rust/labels/T-rustdoc)
- [x] https://github.com/rust-lang/rust/issues/34902 (https://github.com/rust-lang/rust/labels/T-compiler; current status unclear)
- [x] https://github.com/rust-lang/rust/issues/44074 (
https://github.com/rust-lang/rust/labels/T-compiler; env var info)
- [x] https://github.com/rust-lang/rust/issues/45397 (https://github.com/rust-lang/rust/labels/A-LLVM, https://github.com/rust-lang/rust/labels/A-debuginfo; looks LLVM related, seems to have resolved)
- [x] https://github.com/rust-lang/rust/issues/90301 (https://github.com/rust-lang/rust/labels/A-LLVM, https://github.com/rust-lang/rust/labels/A-debuginfo)
    - Upstream fix: https://reviews.llvm.org/D113468
    - [x] https://github.com/rust-lang/rust/issues/90357
- [x] https://github.com/rust-lang/rust/issues/47086 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/O-macos, https://github.com/rust-lang/rust/labels/A-debuginfo)
- [x] https://github.com/rust-lang/rust/issues/57041 (insufficiently specific)
- [x] https://github.com/rust-lang/cargo/issues/6914 (https://github.com/rust-lang/rust/labels/T-cargo; resolved separately)
- [x] https://github.com/rust-lang/rust/issues/61216 (https://github.com/rust-lang/rust/labels/T-rustdoc; resolved in a separate improvement PR but can't find which) 
- [x] https://github.com/rust-lang/rust/issues/63713 (https://github.com/rust-lang/rust/labels/T-compiler)
    - Related: #65036
- [x] https://github.com/rust-lang/rust/issues/65036 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-testsuite)
- [x] https://github.com/rust-lang/rust/issues/81296 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-testsuite)
- [x] https://github.com/rust-lang/rust/issues/66568 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/O-macos, https://github.com/rust-lang/rust/labels/A-run-make, https://github.com/rust-lang/rust/labels/A-testsuite)
- [x] https://github.com/rust-lang/rust/issues/66955 (https://github.com/rust-lang/rust/labels/T-compiler; `--remap-path-prefix`)
- [x] https://github.com/rust-lang/rust/issues/75263 (https://github.com/rust-lang/rust/labels/T-compiler; `--remap-path-prefix` involved)
- [x] https://github.com/rust-lang/rust/issues/73167 (https://github.com/rust-lang/rust/labels/T-compiler; `--remap-path-prefix` involved)
- [x] https://github.com/rust-lang/rust/issues/40552 (closed in favor of more specific issues and RFC-based approaches)
- [x] https://github.com/rust-lang/rust/issues/84125 (https://github.com/rust-lang/rust/labels/T-compiler; `--remap-path-prefix` involved)
- [x] https://github.com/rust-lang/cargo/issues/9311 (https://github.com/rust-lang/rust/labels/T-cargo)
- [x] https://github.com/rust-lang/rust/issues/71222 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-diagnostics)
- [x] https://github.com/rust-lang/rust/issues/72913 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-diagnostics)
- [x] https://github.com/rust-lang/rust/issues/76496 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-diagnostics)
- [x] https://github.com/rust-lang/rust/issues/80776 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-diagnostics, https://github.com/rust-lang/rust/labels/O-wasm)
- [x] https://github.com/rust-lang/rust/issues/82074 (https://github.com/rust-lang/rust/labels/T-compiler, `--remap-path-prefix`)
- [x] https://github.com/rust-lang/rust/issues/82108 (https://github.com/rust-lang/rust/labels/T-compiler, `--remap-path-prefix`; paths reverse order from clang/gcc but was intentional)
- [x] https://github.com/rust-lang/rust/issues/82392 (https://github.com/rust-lang/rust/labels/T-compiler, `-Crpath`)
- [x] https://github.com/rust-lang/rust/issues/87325 (https://github.com/rust-lang/rust/labels/T-compiler, `-Z remap-cwd-prefix`; closed in favor of tracking issue #89434 for `-Z remap-cwd-prefix`)
- [x] https://github.com/rust-lang/rust/issues/87825 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-debuginfo, https://github.com/rust-lang/rust/labels/O-windows-msvc, `--remap-path-prefix`)
- [x] https://github.com/rust-lang/rust/issues/90357 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-debuginfo, https://github.com/rust-lang/rust/labels/A-llvm, https://github.com/rust-lang/rust/labels/A-lto)
- [x] https://github.com/rust-lang/rust/issues/113584 (https://github.com/rust-lang/rust/labels/T-compiler; issue disappeared after stable version update but unclear what fixed it)
- [x] https://github.com/rust-lang/rust/issues/119372 (https://github.com/rust-lang/rust/labels/T-compiler, `compiler_builtins`)
- [x] https://github.com/rust-lang/rust/issues/124357 (fuchsia build system specific, unclear)
- [x] https://github.com/rust-lang/rust/issues/73740 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-debuginfo, https://github.com/rust-lang/rust/labels/A-diagnostics, `--remap-path-prefix`)
- [x] https://github.com/rust-lang/rust/issues/88754 (https://github.com/rust-lang/rust/labels/T-compiler, https://github.com/rust-lang/rust/labels/A-diagnostics)

## Related issues, RFCs, MCPs and discussions

- https://github.com/rust-lang/rust/pull/108312 (https://github.com/rust-lang/rust/labels/T-compiler)
- https://github.com/rust-lang/rfcs/pull/3127 (https://github.com/rust-lang/rust/labels/F-trim-paths)
- https://github.com/rust-lang/compiler-team/issues/450

## Related PRs

- [x] https://github.com/rust-lang/rust/pull/71858
- [x] https://github.com/rust-lang/rust/pull/89041
- [x] https://github.com/rust-lang/rust/pull/71931
- [x] https://github.com/rust-lang/rust/pull/64131
- [x] https://github.com/rust-lang/rust/pull/65043
- [x] https://github.com/rust-lang/rust/pull/81393
- [x] https://github.com/rust-lang/rust/pull/88771
- [x] https://github.com/rust-lang/rust/pull/106977
- [x] https://github.com/rust-lang/rust/pull/84233
- [x] https://github.com/rust-lang/rust/pull/115214
- [x] https://github.com/rust-lang/rust/pull/122450
- [x] https://github.com/rust-lang/cargo/pull/12625
- [x] https://github.com/rust-lang/rust/pull/128736
- [x] https://github.com/rust-lang/cargo/pull/6966
- [x] https://github.com/rust-lang/rust/pull/71310
- [x] https://github.com/rust-lang/rust/pull/72982
- [x] https://github.com/rust-lang/rust/pull/76515
- [x] https://github.com/rust-lang/rust/pull/82102
- [x] https://github.com/rust-lang/rust/pull/91566
- [x] https://github.com/rust-lang/rust/pull/86025
- [x] https://github.com/rust-lang/rust/pull/87320
- [x] https://github.com/rust-lang/rust/pull/121297
- [x] https://github.com/rust-lang/rust/pull/95685
- [x] https://github.com/rust-lang/compiler-builtins/pull/549
- [x] https://github.com/rust-lang/rust/pull/107099