blob: fe0507c981e52f2c7471b55eedaa0c53d3a1c95d [file] [log] [blame]
Patrick Williams39653562024-03-01 08:54:02 -06001rust: reproducibility issue fix with v1.75
2
Patrick Williams03514f12024-04-05 07:04:11 -05003With 1.75 rust release, the '.rustc' section of shared object libs are embedded with absolute path names which is casuing reproducibility issues.
Patrick Williams39653562024-03-01 08:54:02 -06004This change will fix the path name format back to '/rust/$hash' as in earlier versions.
5
6Below are the links for detailed bug description & discusssion with upstream rust.
7https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219
8https://github.com/rust-lang/rust/issues/120825#issuecomment-1964652656
9
Patrick Williams03514f12024-04-05 07:04:11 -050010Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/121959/commits/a9a979839bbdfec48c75d618ab0dce8a953589b8]
Patrick Williams39653562024-03-01 08:54:02 -060011Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
12---
Patrick Williams03514f12024-04-05 07:04:11 -050013--- a/compiler/rustc_session/src/session.rs 2023-12-21 08:55:28.000000000 -0800
14+++ b/compiler/rustc_session/src/session.rs 2024-02-26 07:29:15.527577022 -0800
15@@ -1260,19 +1260,6 @@
16 }
17
18 pub fn should_prefer_remapped_for_codegen(&self) -> bool {
19- // bail out, if any of the requested crate types aren't:
20- // "compiled executables or libraries"
21- for crate_type in &self.opts.crate_types {
22- match crate_type {
23- CrateType::Executable
24- | CrateType::Dylib
25- | CrateType::Rlib
26- | CrateType::Staticlib
27- | CrateType::Cdylib => continue,
Patrick Williams39653562024-03-01 08:54:02 -060028- CrateType::ProcMacro => return false,
Patrick Williams03514f12024-04-05 07:04:11 -050029- }
30- }
31-
32 let has_split_debuginfo = match self.split_debuginfo() {
33 SplitDebuginfo::Off => false,
34 SplitDebuginfo::Packed => true,
35
36