From a2ae507b646cad7bd3c859dc4f9dd985fe57b6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Sun, 7 Dec 2025 22:11:38 +0100 Subject: [PATCH 1/2] Limit debuginfo to `line-tables-only` --- compiler/rustc_session/src/config.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index f97a29e064b65..4640bd4836e89 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -2303,8 +2303,8 @@ fn parse_opt_level( } fn select_debuginfo(matches: &getopts::Matches, cg: &CodegenOptions) -> DebugInfo { - let max_g = matches.opt_positions("g").into_iter().max(); - let max_c = matches + let _max_g = matches.opt_positions("g").into_iter().max(); + let _max_c = matches .opt_strs_pos("C") .into_iter() .flat_map(|(i, s)| { @@ -2312,7 +2312,13 @@ fn select_debuginfo(matches: &getopts::Matches, cg: &CodegenOptions) -> DebugInf if let Some("debuginfo") = s.split('=').next() { Some(i) } else { None } }) .max(); - if max_g > max_c { DebugInfo::Full } else { cg.debuginfo } + match cg.debuginfo { + DebugInfo::None => DebugInfo::None, + DebugInfo::LineDirectivesOnly => DebugInfo::LineDirectivesOnly, + DebugInfo::LineTablesOnly => DebugInfo::LineTablesOnly, + DebugInfo::Limited => DebugInfo::LineTablesOnly, + DebugInfo::Full => DebugInfo::LineTablesOnly, + } } fn parse_assert_incr_state( From 4b1fe5f743c89f01e486ce9dd52bd2fb5f56270b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Tue, 9 Dec 2025 13:20:48 +0100 Subject: [PATCH 2/2] WIP --- src/tools/opt-dist/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/opt-dist/src/main.rs b/src/tools/opt-dist/src/main.rs index 48b25f235dd6a..62833457cde32 100644 --- a/src/tools/opt-dist/src/main.rs +++ b/src/tools/opt-dist/src/main.rs @@ -1,3 +1,5 @@ +#![allow(unused, warnings)] + use anyhow::Context; use camino::{Utf8Path, Utf8PathBuf}; use clap::Parser; @@ -396,7 +398,7 @@ fn execute_pipeline( // possible regressions. // The tests are not executed for fast try builds, which can be broken and might not pass them. if !is_fast_try_build() && env.run_tests() { - timer.section("Run tests", |_| run_tests(env))?; + // timer.section("Run tests", |_| run_tests(env))?; } Ok(())