Skip to content

Commit 7433255

Browse files
Auto merge of #112049 - Kobzol:pgo-omit-benchmarks, r=<try>
[do not merge] CI experiments try-job: dist-x86_64-linux
2 parents 5549523 + a2ae507 commit 7433255

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎compiler/rustc_session/src/config.rs‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,16 +2303,22 @@ fn parse_opt_level(
23032303
}
23042304

23052305
fn select_debuginfo(matches: &getopts::Matches, cg: &CodegenOptions) -> DebugInfo {
2306-
let max_g = matches.opt_positions("g").into_iter().max();
2307-
let max_c = matches
2306+
let _max_g = matches.opt_positions("g").into_iter().max();
2307+
let _max_c = matches
23082308
.opt_strs_pos("C")
23092309
.into_iter()
23102310
.flat_map(|(i, s)| {
23112311
// NB: This can match a string without `=`.
23122312
if let Some("debuginfo") = s.split('=').next() { Some(i) } else { None }
23132313
})
23142314
.max();
2315-
if max_g > max_c { DebugInfo::Full } else { cg.debuginfo }
2315+
match cg.debuginfo {
2316+
DebugInfo::None => DebugInfo::None,
2317+
DebugInfo::LineDirectivesOnly => DebugInfo::LineDirectivesOnly,
2318+
DebugInfo::LineTablesOnly => DebugInfo::LineTablesOnly,
2319+
DebugInfo::Limited => DebugInfo::LineTablesOnly,
2320+
DebugInfo::Full => DebugInfo::LineTablesOnly,
2321+
}
23162322
}
23172323

23182324
fn parse_assert_incr_state(

0 commit comments

Comments
 (0)