d-bootstrap-custom-debuginfo-path
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Thu, 14 Jul 2022 11:17:39 +0000 (13:17 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Wed, 12 Jun 2024 15:33:10 +0000 (17:33 +0200)
===================================================================

Gbp-Pq: Name d-bootstrap-custom-debuginfo-path.patch

src/bootstrap/src/core/builder.rs
src/bootstrap/src/lib.rs
tests/codegen/remap_path_prefix/issue-73167-remap-std.rs

index 2e7508f9d81760a4d5494224bc86dab757eda712..05b259d5df9a4e13d08f0cdc6b15b608b7629cd3 100644 (file)
@@ -1775,7 +1775,8 @@ impl<'a> Builder<'a> {
             cargo.env("CFG_VIRTUAL_RUST_SOURCE_BASE_DIR", map_to);
         }
 
-        if self.config.rust_remap_debuginfo {
+       // Debian: this breaks with our vendored sources!
+        if false && self.config.rust_remap_debuginfo {
             // FIXME: handle vendored sources
             let registry_src = t!(home::cargo_home()).join("registry").join("src");
             let mut env_var = OsString::new();
index 33b8f1a7ce720c03a92555482c043701d8ceb204..6db979039e89989cc9215d89d215f135cba49dc8 100644 (file)
@@ -1163,10 +1163,9 @@ impl Build {
 
         match which {
             GitRepo::Rustc => {
-                let sha = self.rust_sha().unwrap_or(&self.version);
-                Some(format!("/rustc/{sha}"))
+                Some(format!("/usr/src/rustc-{}", &self.version))
             }
-            GitRepo::Llvm => Some(String::from("/rustc/llvm")),
+            GitRepo::Llvm => panic!("GitRepo::Llvm unsupported on Debian"),
         }
     }
 
index b66abc6bedf0f33437a98f6d7b2cc87ca83c57e5..f6efe1e48da5d34ae45549ccddf97f5b2ce630b3 100644 (file)
@@ -7,7 +7,7 @@
 // true automatically. If paths to std library hasn't been remapped, we use the
 // above simulate-remapped-rust-src-base option to do it temporarily
 
-// CHECK: !DIFile(filename: "{{/rustc/.*/library/std/src/panic.rs}}"
+// CHECK: !DIFile(filename: "{{/usr/src/rustc-.*/library/std/src/panic.rs}}"
 fn main() {
     std::thread::spawn(|| {
         println!("hello");