We've seen the issue Librustc_driver.so not reproducible again while building rust in Yocto project.
The libs are not reproducible even after the remap-debuginfo option is enabled. It was working till 1.74.1 and this issue observed from 1.75.0 onwards.
See the non-reproducible libs below.
I've analyzed the changes from 1.74.1 to 1.75.0, there are changes related to Cargo, llvm & some changes w.r.t to bolt feature/optimization are there. I've tried a few builds by reverting these changes but still the issue is reproducing.
There are a few commits in 85c0ce2 for src/bootstrap/src/core/builder.rs & src/bootstrap/src/bin/rustc.rs files which have changes related to remap-debuginfo option and I suspect this commit might causing the issue.
I tried build by reverting this commit & with the latest changes in 4b7e0a0 but still issue is reproduing. There is a new RUSTC_CARGO_REGISTRY_SRC_TO_REMAP is added in this commit. I added a few debug statements in here to see the build paths passed, I can see those are passed correctly to RUSTC_CARGO_REGISTRY_SRC_TO_REMAP.
Any hints on what might cause reproducible issue on rust 1.75? Let me know if any other info is needed.
The same issue is here also - rust libs are not reproducible from 1.75 · Issue #120825 · rust-lang/rust · GitHub