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>
Thu, 16 Apr 2026 08:00:20 +0000 (10:00 +0200)
Forwarded: not-needed
===================================================================

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

24 files changed:
src/bootstrap/src/lib.rs
tests/codegen-llvm/remap_path_prefix/issue-73167-remap-std.rs
tests/run-make/remap-path-prefix-std/rmake.rs
tests/rustdoc-ui/ice-bug-report-url.rs
tests/rustdoc-ui/track-diagnostics.rs
tests/ui/extern/extern-types-field-offset.rs
tests/ui/hygiene/panic-location.rs
tests/ui/mir/lint/storage-live.rs
tests/ui/mir/lint/storage-live.stderr
tests/ui/panics/panic-in-cleanup.rs
tests/ui/panics/panic-in-cleanup.run.stderr
tests/ui/panics/panic-in-ffi.rs
tests/ui/panics/panic-in-ffi.run.stderr
tests/ui/process/println-with-broken-pipe.rs
tests/ui/resolve/multiple_definitions_attribute_merging.rs
tests/ui/resolve/multiple_definitions_attribute_merging.stderr
tests/ui/resolve/proc_macro_generated_packed.rs
tests/ui/resolve/proc_macro_generated_packed.stderr
tests/ui/track-diagnostics/track.rs
tests/ui/track-diagnostics/track2.rs
tests/ui/track-diagnostics/track3.rs
tests/ui/track-diagnostics/track4.rs
tests/ui/track-diagnostics/track5.rs
tests/ui/track-diagnostics/track6.rs

index 857c0539e7d2755b0314a98f02474abdfffd0894..8abe0e7e4eee3d6ab8f8e4c79e1a32227086cdc0 100644 (file)
@@ -1223,27 +1223,9 @@ impl Build {
 
         match which {
             GitRepo::Rustc => {
-                let sha = self.rust_sha().unwrap_or(&self.version);
-
-                match remap_scheme {
-                    RemapScheme::Compiler => {
-                        // For compiler sources, remap via `/rustc-dev/{sha}` to allow
-                        // distinguishing between compiler sources vs library sources, since
-                        // `rustc-dev` dist component places them under
-                        // `$sysroot/lib/rustlib/rustc-src/rust` as opposed to `rust-src`'s
-                        // `$sysroot/lib/rustlib/src/rust`.
-                        //
-                        // Keep this scheme in sync with `rustc_metadata::rmeta::decoder`'s
-                        // `try_to_translate_virtual_to_real`.
-                        Some(format!("/rustc-dev/{sha}"))
-                    }
-                    RemapScheme::NonCompiler => {
-                        // For non-compiler sources, use `/rustc/{sha}` remapping scheme.
-                        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 eb610168dd3b417d1251814cb67f7426082d3ce6..9119c1d92e0b42d85ec366344f8fbb4325153af7 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");
index f5179038a9b1122a4dfdcf90814ef499c40f0f15..788ebceeb927d45d287c7f018d9b15159ea5d77c 100644 (file)
@@ -48,6 +48,6 @@ fn main() {
     llvm_dwarfdump()
         .input("libstd.rlib")
         .run()
-        .assert_stdout_contains("/rustc/")
+        .assert_stdout_contains_regex("/usr/src/rustc-[^/]+/")
         .assert_stdout_not_contains(source_root().to_string_lossy());
 }
index 2e384fa1be623dd05ad23c0b82efeb3804e87bbb..f31ea3fc4c74ccd007d73449e7c4dd301292dee5 100644 (file)
@@ -4,7 +4,7 @@
 
 //@ normalize-stderr: "note: compiler flags.*\n\n" -> ""
 //@ normalize-stderr: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}"
-//@ normalize-stderr: "thread.*panicked at compiler.*" -> ""
+//@ normalize-stderr: "thread.*panicked at /.*compiler.*" -> ""
 //@ normalize-stderr: " +\d{1,}: .*\n" -> ""
 //@ normalize-stderr: " + at .*\n" -> ""
 //@ normalize-stderr: ".*note: Some details are omitted.*\n" -> ""
index f8e710659a5c8a9a52298bd7278895f1a8132bae..ae909051fe6dfc1363b2b7622b647e79ad21b404 100644 (file)
@@ -3,6 +3,7 @@
 // Normalize the emitted location so this doesn't need
 // updating everytime someone adds or removes a line.
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
+//@ normalize-stderr: "/usr/src/rustc-[^/]+/" -> ""
 
 struct A;
 struct B;
index 9fe1cdf3bc47a5835fece31f5541354fd9a7cc96..e19815e767154685a8f20b9e2a9c0930211cdd23 100644 (file)
@@ -3,6 +3,7 @@
 //@ exec-env:RUST_BACKTRACE=0
 //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 //@ ignore-backends: gcc
 #![feature(extern_types)]
 
index 27850f3e4c3a7cc06817e6cc264ecb76dc37423e..8bbbc936cead62b75e7fd456cc699795a7b1152d 100644 (file)
@@ -3,6 +3,7 @@
 //@ exec-env:RUST_BACKTRACE=0
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 //
 // Regression test for issue #70963
 // The reported panic location should not be `<::core::macros::panic macros>`.
index 047ceaaf82c6137708d417c145aa480021f98af6..d1f742a7927e94ea3db41b26eda9306f9b26c44e 100644 (file)
@@ -5,6 +5,7 @@
 //@ normalize-stderr: "storage_live\[....\]" -> "storage_live[HASH]"
 //@ normalize-stderr: "(delayed at [^:]+):\d+:\d+ - " -> "$1:LL:CC - "
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 //@ rustc-env:RUST_BACKTRACE=0
 
 #![feature(custom_mir, core_intrinsics)]
index ef0d253b15a8c4876b6bffc75759b1f37d73d177..651b8e2327ee67f20c650c986d1a7d7b3202c7a3 100644 (file)
@@ -1,12 +1,12 @@
 error: internal compiler error: broken MIR in Item(DefId(0:8 ~ storage_live[HASH]::multiple_storage)) (after pass CheckForceInline) at bb0[1]:
                                 StorageLive(_1) which already has storage here
-  --> $DIR/storage-live.rs:22:13
+  --> $DIR/storage-live.rs:23:13
    |
 LL |             StorageLive(a);
    |             ^^^^^^^^^^^^^^
    |
 note: delayed at compiler/rustc_mir_transform/src/lint.rs:LL:CC - disabled backtrace
-  --> $DIR/storage-live.rs:22:13
+  --> $DIR/storage-live.rs:23:13
    |
 LL |             StorageLive(a);
    |             ^^^^^^^^^^^^^^
index 23430d1f496e5b7b1c8c29574b4e1a5c9e218e58..6ecec068d202423af88a883551567c6bcd5d203a 100644 (file)
@@ -6,6 +6,7 @@
 //@ normalize-stderr: "\n +at [^\n]+" -> ""
 //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 //@ needs-unwind
 //@ ignore-emscripten "RuntimeError" junk in output
 //@ ignore-msvc SEH doesn't do panic-during-cleanup the same way as everyone else
index b6b396d8617d44dc7d42b0188479054e613a3d37..b0cd28c382b10785aec59e41c932642d6d89b65e 100644 (file)
@@ -1,9 +1,9 @@
 
-thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:23:5:
+thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:24:5:
 explicit panic
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
-thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:17:9:
+thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:18:9:
 BOOM
 stack backtrace:
 
index ef40a3b6f7d6f853430e07d3dacbf0db5496abf7..0f008fdeb087d9fb65edd18ee1e402667d273cad 100644 (file)
@@ -7,6 +7,7 @@
 //@ normalize-stderr: "\n +at [^\n]+" -> ""
 //@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 //@ needs-unwind
 //@ ignore-emscripten "RuntimeError" junk in output
 
index 49eb92ef7c913934ca88ccab7792c5bac76ae96c..7c493d256e37785105f600a72b412a0d340a80c8 100644 (file)
@@ -1,5 +1,5 @@
 
-thread 'main' ($TID) panicked at $DIR/panic-in-ffi.rs:22:5:
+thread 'main' ($TID) panicked at $DIR/panic-in-ffi.rs:23:5:
 Test
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 Noisy Drop
index 51521f1dcf42a9d74ddcf5f6556883c9a7eeb3e6..01a3afa019f99d4860a66cef915624f484c0e8cc 100644 (file)
@@ -12,6 +12,7 @@
 //@ ignore-backends: gcc
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 //@ compile-flags: -Zon-broken-pipe=error
 
 // Test what the error message looks like when `println!()` panics because of
@@ -41,8 +42,11 @@ fn main() {
         .stdout(Stdio::piped())
         .spawn()
         .unwrap();
-    let mut consumer =
-        Command::new("head").arg("-n1").stdin(producer.stdout.take().unwrap()).spawn().unwrap();
+    let mut consumer = Command::new("head")
+        .arg("-n1")
+        .stdin(producer.stdout.take().unwrap())
+        .spawn()
+        .unwrap();
     consumer.wait().unwrap();
     producer.wait().unwrap();
 }
index 9f1bff51a3d4cffff42130ef731d38c6d33b779a..6a60b8c97cd92fcdaa63d897ab0e3a9e63200f22 100644 (file)
@@ -8,6 +8,7 @@
 //@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
 //@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 //@ rustc-env:RUST_BACKTRACE=0
 
 #[repr(packed)]
index b8b33e3417bf7bc31bd328c4d1082c627029e44e..8eb7ea594900302c94337dd0ae08a90f5de172f3 100644 (file)
@@ -1,5 +1,5 @@
 error[E0428]: the name `Dealigned` is defined multiple times
-  --> $DIR/multiple_definitions_attribute_merging.rs:18:1
+  --> $DIR/multiple_definitions_attribute_merging.rs:19:1
    |
 LL | struct Dealigned<T>(u8, T);
    | --------------------------- previous definition of the type `Dealigned` here
@@ -8,7 +8,7 @@ LL | struct Dealigned<T>(u8, T);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Dealigned` redefined here
    |
    = error: internal compiler error: compiler/rustc_mir_transform/src/check_packed_ref.rs:LL:CC: builtin derive created an unaligned reference
-  --> $DIR/multiple_definitions_attribute_merging.rs:18:25
+  --> $DIR/multiple_definitions_attribute_merging.rs:19:25
    |
 LL | #[derive(PartialEq)]
    |          --------- in this derive macro expansion
@@ -19,8 +19,8 @@ LL | struct Dealigned<T>(u8, T);
 
 Box<dyn Any>
 query stack during panic:
-#0 [mir_built] building MIR for `<impl at $DIR/multiple_definitions_attribute_merging.rs:16:10: 16:19>::eq`
-#1 [check_unsafety] unsafety-checking `<impl at $DIR/multiple_definitions_attribute_merging.rs:16:10: 16:19>::eq`
+#0 [mir_built] building MIR for `<impl at $DIR/multiple_definitions_attribute_merging.rs:17:10: 17:19>::eq`
+#1 [check_unsafety] unsafety-checking `<impl at $DIR/multiple_definitions_attribute_merging.rs:17:10: 17:19>::eq`
 ... and 1 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
 error: aborting due to 2 previous errors
 
index a8175895af04ba41d0c44245cd3ded22b3bad842..c777ed86a271bca47212c63c7cd6c0dd7e66e1f0 100644 (file)
@@ -8,6 +8,7 @@
 //@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
 //@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 //@ rustc-env:RUST_BACKTRACE=0
 
 extern crate proc_macro_generate_packed;
index d8e160d0c6a03a8219f47c7d909ad6270474a76f..4275261279bb8cffdb1bdfedaa3045e0f8a5db04 100644 (file)
@@ -1,5 +1,5 @@
 error: internal compiler error: compiler/rustc_mir_transform/src/check_packed_ref.rs:LL:CC: builtin derive created an unaligned reference
-  --> $DIR/proc_macro_generated_packed.rs:19:25
+  --> $DIR/proc_macro_generated_packed.rs:20:25
    |
 LL | #[derive(PartialEq)]
    |          --------- in this derive macro expansion
@@ -10,8 +10,8 @@ LL | struct Dealigned<T>(u8, T);
 
 Box<dyn Any>
 query stack during panic:
-#0 [mir_built] building MIR for `<impl at $DIR/proc_macro_generated_packed.rs:16:10: 16:19>::eq`
-#1 [check_unsafety] unsafety-checking `<impl at $DIR/proc_macro_generated_packed.rs:16:10: 16:19>::eq`
+#0 [mir_built] building MIR for `<impl at $DIR/proc_macro_generated_packed.rs:17:10: 17:19>::eq`
+#1 [check_unsafety] unsafety-checking `<impl at $DIR/proc_macro_generated_packed.rs:17:10: 17:19>::eq`
 ... and 1 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
 error: aborting due to 1 previous error
 
index 09864a6e30902b07d598eb69f157ca6f0f6af97d..08c3dac2490e3814c6fca1e97f0d9b668ac137e9 100644 (file)
@@ -8,6 +8,7 @@
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 //@ normalize-stderr: "note: rustc .+ running on .+" -> "note: rustc $$VERSION running on $$TARGET"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 
 // The test becomes too flaky if we care about exact args. If `-Z ui-testing`
 // from compiletest and `-Z track-diagnostics` from `// compile-flags` at the
index 145b2a3e5d57b03506f4edac218630256d7a51ba..593624f971ab006c2d621b8a098c72837400b1ef 100644 (file)
@@ -5,6 +5,7 @@
 // updating everytime someone adds or removes a line.
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 
 fn main() {
     let _moved @ _from = String::from("foo");
index 144f2794e9104a2fee9a0eb2955f118125919c66..f05f443f17b43a3169533e3cbe183c54c4ef725b 100644 (file)
@@ -5,6 +5,7 @@
 // updating everytime someone adds or removes a line.
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 
 fn main() {
     let _unimported = Blah { field: u8 };
index 2ab7d542330311941447dfd1b8a82f311191b3bd..c9389f13e584c48147423d2651059ce234a9dbdd 100644 (file)
@@ -5,6 +5,7 @@
 // updating everytime someone adds or removes a line.
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 
 pub onion {
     //~^ ERROR missing `enum` for enum definition
index 4d47f56e58061c6a8328177bb17c2fa911c3bd37..a96520ae3ee1dba49532578454b02dab42d45c84 100644 (file)
@@ -5,6 +5,7 @@
 // updating everytime someone adds or removes a line.
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 
 }
 //~^ ERROR unexpected closing delimiter: `}`
index aa75c5691e5f968997144064e58fb93076329ded..8b9e9cb165ec5a9d87adaaed3d64fb75f81c05d2 100644 (file)
@@ -5,6 +5,7 @@
 // updating everytime someone adds or removes a line.
 //@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
 //@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
 
 pub trait Foo {
     fn bar();