From: Debian Rust Maintainers Date: Thu, 14 Jul 2022 11:17:39 +0000 (+0200) Subject: d-bootstrap-custom-debuginfo-path X-Git-Tag: archive/raspbian/1.91.1+dfsg1-1+rpi1~1^2~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9351f70b41a76ec697e511fe2b262394fa8c2f41;p=rustc.git d-bootstrap-custom-debuginfo-path Forwarded: not-needed =================================================================== Gbp-Pq: Topic build Gbp-Pq: Name d-bootstrap-custom-debuginfo-path.patch --- diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index a2aeed2094..539b0a899a 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -1228,27 +1228,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"), } } diff --git a/tests/codegen-llvm/remap_path_prefix/issue-73167-remap-std.rs b/tests/codegen-llvm/remap_path_prefix/issue-73167-remap-std.rs index eb610168dd..9119c1d92e 100644 --- a/tests/codegen-llvm/remap_path_prefix/issue-73167-remap-std.rs +++ b/tests/codegen-llvm/remap_path_prefix/issue-73167-remap-std.rs @@ -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");