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, 19 Jun 2024 05:51:49 +0000 (07:51 +0200)
Forwarded: not-needed
===================================================================

Gbp-Pq: Topic build
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 82f8e91b41689716718d11b9cc4185f594dccc68..5f4a7af2ea937d27a636849b04309e5e286995d9 100644 (file)
@@ -1787,7 +1787,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 871318de5955e8015cd89015a53d4a3be315adb5..861a2aa0e34020c571d433f2bca43540a4b90fec 100644 (file)
@@ -1155,10 +1155,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");