1rust: reproducibility issue fix with v1.75
2
3With 1.75 rust release, the '.rustc' section of shared object libs are embedded with absolute path names which is casuing reproducibility issues.
4This 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
10Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/121959/commits/a9a979839bbdfec48c75d618ab0dce8a953589b8]
11Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
12---
13--- 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,
28-                CrateType::ProcMacro => return false,
29-            }
30-        }
31-
32         let has_split_debuginfo = match self.split_debuginfo() {
33             SplitDebuginfo::Off => false,
34             SplitDebuginfo::Packed => true,
35
36
37