about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSundeep KOKKONDA <56015745+sundeep-kokkonda@users.noreply.github.com>2024-03-04 08:18:54 +0530
committerGitHub <noreply@github.com>2024-03-04 08:18:54 +0530
commita9a979839bbdfec48c75d618ab0dce8a953589b8 (patch)
tree10964d27eb14a2633ad68954b592082c9166e1d8
parent70aa0b86c066e721012852a9851fdf8586117823 (diff)
downloadrust-a9a979839bbdfec48c75d618ab0dce8a953589b8.tar.gz
rust-a9a979839bbdfec48c75d618ab0dce8a953589b8.zip
Removing absolute path in proc-macro
With rust 1.75 the absolute build path is embedding into '.rustc' section and which causes reproducibility issues. Detailed issue is here.
https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219

With this change the 'absolute path' changed back to '/rust/$hash' format.
-rw-r--r--compiler/rustc_session/src/session.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index 09fb6aa5d8f..6a76d78b33f 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -898,19 +898,6 @@ impl Session {
     }
 
     pub fn should_prefer_remapped_for_codegen(&self) -> bool {
-        // bail out, if any of the requested crate types aren't:
-        // "compiled executables or libraries"
-        for crate_type in &self.opts.crate_types {
-            match crate_type {
-                CrateType::Executable
-                | CrateType::Dylib
-                | CrateType::Rlib
-                | CrateType::Staticlib
-                | CrateType::Cdylib => continue,
-                CrateType::ProcMacro => return false,
-            }
-        }
-
         let has_split_debuginfo = match self.split_debuginfo() {
             SplitDebuginfo::Off => false,
             SplitDebuginfo::Packed => true,