From 5626120b451e27bfe1f5ecc2357056b9d513ee68 Mon Sep 17 00:00:00 2001 From: retr0b0y <48183585+retr0b0y@users.noreply.github.com> Date: Fri, 9 Oct 2026 23:00:11 +0300 Subject: [PATCH 1/5] fix: add e2k16c and enable host_tools --- .../src/spec/targets/e2k16c_unknown_linux_gnu.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/rustc_target/src/spec/targets/e2k16c_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/e2k16c_unknown_linux_gnu.rs index cce1435552b23..2c63e3d3f68b5 100644 --- a/compiler/rustc_target/src/spec/targets/e2k16c_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/e2k16c_unknown_linux_gnu.rs @@ -4,5 +4,11 @@ pub(crate) fn target() -> Target { let mut base = super::e2k_unknown_linux_gnu::target(); base.cpu = "elbrus-16c".into(); base.llvm_args = cvs!["-enable-elbrus-fma-legalization=0"]; + base.metadata = crate::spec::TargetMetadata { + description: Some("64-bit Linux (kernel 5.10+, glibc 2.35+)".into()), + tier: Some(2), + host_tools: Some(true), + std: Some(true), + }; base } From 3025092b3de7166ce96a140ac378aae97d0183ba Mon Sep 17 00:00:00 2001 From: retr0b0y <48183585+retr0b0y@users.noreply.github.com> Date: Mon, 19 Oct 2026 06:27:19 +0300 Subject: [PATCH 2/5] fix: ice-bug-report-url.rs has been updated ice-bug-report-url.rs has been updated in accordance with https://github.com/rust-lang/rust/commit/8949cf20a274d42f91dbd8c5fc03ae9dccbe3cfb --- tests/rustdoc-ui/ice-bug-report-url.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rustdoc-ui/ice-bug-report-url.rs b/tests/rustdoc-ui/ice-bug-report-url.rs index 2e384fa1be623..5aa82c438fa36 100644 --- a/tests/rustdoc-ui/ice-bug-report-url.rs +++ b/tests/rustdoc-ui/ice-bug-report-url.rs @@ -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 'rustc'.*panicked.*:\n.*\n" -> "" //@ normalize-stderr: " +\d{1,}: .*\n" -> "" //@ normalize-stderr: " + at .*\n" -> "" //@ normalize-stderr: ".*note: Some details are omitted.*\n" -> "" From e0b5746bb9595137cda2cc0966c0b2b738de7d5d Mon Sep 17 00:00:00 2001 From: retr0b0y <48183585+retr0b0y@users.noreply.github.com> Date: Mon, 19 Oct 2026 06:29:02 +0300 Subject: [PATCH 3/5] fix: ice-bug-report-url.stderr has been updated ice-bug-report-url.stderr has been updated in accordance with https://github.com/rust-lang/rust/commit/8949cf20a274d42f91dbd8c5fc03ae9dccbe3cfb --- tests/rustdoc-ui/ice-bug-report-url.stderr | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/rustdoc-ui/ice-bug-report-url.stderr b/tests/rustdoc-ui/ice-bug-report-url.stderr index bc46b226a703e..01dac0433e630 100644 --- a/tests/rustdoc-ui/ice-bug-report-url.stderr +++ b/tests/rustdoc-ui/ice-bug-report-url.stderr @@ -5,8 +5,6 @@ LL | fn wrong() | ^ expected one of `->`, `where`, or `{` - -aborting due to `-Z treat-err-as-bug=1` stack backtrace: error: the compiler unexpectedly panicked. This is a bug From d78b4faeed008a50a8f69b9d89deff4be1a1e1cd Mon Sep 17 00:00:00 2001 From: retr0b0y <48183585+retr0b0y@users.noreply.github.com> Date: Mon, 19 Oct 2026 06:30:55 +0300 Subject: [PATCH 4/5] fix: track-diagnostics.rs has been updated track-diagnostics.rs has been updated in accordance with https://github.com/rust-lang/rust/pull/154394/changes/d10baae9ce4947706623256d4a31d588e9cfaafe --- tests/rustdoc-ui/track-diagnostics.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/rustdoc-ui/track-diagnostics.rs b/tests/rustdoc-ui/track-diagnostics.rs index f8e710659a5c8..e1b2aa01298a2 100644 --- a/tests/rustdoc-ui/track-diagnostics.rs +++ b/tests/rustdoc-ui/track-diagnostics.rs @@ -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: "/rustc(?:-dev)?/[a-z0-9.]+/" -> "" struct A; struct B; From ead75cc8e1bf50aee151eec2d49dee5264967110 Mon Sep 17 00:00:00 2001 From: retr0b0y <48183585+retr0b0y@users.noreply.github.com> Date: Mon, 19 Oct 2026 06:34:02 +0300 Subject: [PATCH 5/5] fix: rmake.rs has been updated rmake.rs has been updated in accordance with https://github.com/rust-lang/rust/commit/6fe13d9c9d7f592dfabdef8c8e8eed3cf7e6fa2c --- tests/run-make/remap-path-prefix-std/rmake.rs | 75 ++++++++++++++----- 1 file changed, 58 insertions(+), 17 deletions(-) diff --git a/tests/run-make/remap-path-prefix-std/rmake.rs b/tests/run-make/remap-path-prefix-std/rmake.rs index f5179038a9b11..6e3bb69705c94 100644 --- a/tests/run-make/remap-path-prefix-std/rmake.rs +++ b/tests/run-make/remap-path-prefix-std/rmake.rs @@ -1,5 +1,6 @@ // This test makes sure that we do not leak paths to the checkout -// (ie. /checkout in CI) in the distributed `libstd` debuginfo. +// (ie. /checkout in CI) in the distributed standard library debuginfo. +// It checks all rlibs found in the target libdir, not just libstd. // // This test only runs on Linux and dist builder (or with `rust.remap-debuginfo = true` // set in your `bootstrap.toml`). @@ -24,30 +25,70 @@ fn main() { path }; - // Find all the `libstd-.*.rlib` files under the libdir - let libstd_rlibs = shallow_find_files(&target_libdir, |p| { + // Find all rlib files under the libdir (the full standard library set) + let all_rlibs = shallow_find_files(&target_libdir, |p| { if let Some(filename) = p.file_name() && let filename = filename.to_string_lossy() + && let Some(ext) = p.extension() + && filename.starts_with("lib") + && ext == "rlib" + && filename.contains('-') { - filename.starts_with("libstd-") && filename.ends_with(".rlib") + true } else { false } }); - // Assert that there is only one rlib for the `libstd` - let [libstd_rlib] = &libstd_rlibs[..] else { - unreachable!("multiple libstd rlib: {libstd_rlibs:?} in {target_libdir:?}"); - }; + // There must be at least one rlib (libstd itself, plus many others) + assert!(!all_rlibs.is_empty(), "no rlibs found in target libdir {target_libdir:?}"); + + for rlib in &all_rlibs { + // Use a stable symlink name based on the crate part (before the '-' suffix). + // e.g. "libstd-92abaa9b58c011c1.rlib" → "libstd.rlib" + let filename = rlib.file_name().unwrap().to_string_lossy(); + let link_name = match filename.split_once('-') { + Some((prefix, _)) => format!("{prefix}.rlib"), + None => filename.to_string(), + }; - // Symlink the libstd rlib here to avoid absolute paths from llvm-dwarfdump own output - // and not from the debuginfo it-self - rfs::symlink_file(libstd_rlib, "libstd.rlib"); + // Symlink the original rlib to avoid absolute paths from dwarfdump itself + rfs::symlink_file(rlib, &link_name); + + // Check that no distributed rlib leaks the checkout/source root path. + let completed = llvm_dwarfdump().input(&link_name).run_unchecked(); + if !completed.status().success() { + eprintln!("dwarfdump failed on {link_name}: exit status {:?}", completed.status()); + panic!("llvm-dwarfdump failed for {link_name}"); + } + + let stdout = completed.stdout_utf8(); + let source_root = source_root(); + let root = source_root.to_string_lossy(); + + if let Some((i, _)) = + stdout.lines().enumerate().find(|(_, line)| line.contains(root.as_ref())) + { + let lines: Vec<_> = stdout.lines().collect(); - // Check that there is only `/rustc/` paths and no `/checkout`, `/home`, or whatever - llvm_dwarfdump() - .input("libstd.rlib") - .run() - .assert_stdout_contains("/rustc/") - .assert_stdout_not_contains(source_root().to_string_lossy()); + let start = i.saturating_sub(2); + let end = (i + 3).min(lines.len()); + + eprintln!("leaked source-root path found in {link_name}:"); + + for line in &lines[start..end] { + eprintln!("{line}"); + } + + panic!("found leaked source-root path in {link_name}"); + } + + // Check that remapped paths are present if the rlib has debug info. + if stdout.contains("DW_TAG_compile_unit") { + assert!( + stdout.contains("/rustc/") || stdout.contains("/rust/deps"), + "Expected remapped paths in dwarfdump output for {link_name}", + ); + } + } }