Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 1 | rust: reproducibility issue fix with v1.75 |
| 2 | |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 3 | With 1.75 rust release, the '.rustc' section of shared object libs are embedded with absolute path names which is casuing reproducibility issues. |
Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 4 | This change will fix the path name format back to '/rust/$hash' as in earlier versions. |
| 5 | |
| 6 | Below are the links for detailed bug description & discusssion with upstream rust. |
| 7 | https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219 |
| 8 | https://github.com/rust-lang/rust/issues/120825#issuecomment-1964652656 |
| 9 | |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 10 | Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/121959/commits/a9a979839bbdfec48c75d618ab0dce8a953589b8] |
Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 11 | Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> |
| 12 | --- |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 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, |
Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 28 | - CrateType::ProcMacro => return false, |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 29 | - } |
| 30 | - } |
| 31 | - |
| 32 | let has_split_debuginfo = match self.split_debuginfo() { |
| 33 | SplitDebuginfo::Off => false, |
| 34 | SplitDebuginfo::Packed => true, |
| 35 | |
| 36 | |