Skip to content

Commit bf8801d

Browse files
committed
Auto merge of #123337 - workingjubilee:debug-compiler-profile-expectations, r=fmease
Include line tables in compiler profile This profile has only undergone minimal tweaks since it was originally drafted. I asked a number of compiler contributors and they said they set rust.debug explicitly. This was even true for one contributor that set `rust.debug = false`! Almost everyone seems slightly surprised that `rust.debug = true` is not the default. However, adding full debuginfo at this level costs multiple gigabytes! We can still get much better profiling and such by setting `rust.debuginfo-level = "line-tables-only"` at the cost of only 150~200 MB on the weight of a fresh build dir from `./x.py check`.
2 parents b71e8cb + 887151a commit bf8801d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/bootstrap/defaults/config.compiler.toml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ compiler-docs = true
88
# where adding `debug!()` appears to do nothing.
99
# However, it makes running the compiler slightly slower.
1010
debug-logging = true
11+
# Get actually-useful information from backtraces, profiling, etc. with minimal added bytes
12+
debuginfo-level = "line-tables-only"
1113
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
1214
incremental = true
1315
# Print backtrace on internal compiler errors during bootstrap

src/bootstrap/src/utils/change_tracker.rs

+5
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
180180
severity: ChangeSeverity::Info,
181181
summary: "New option `build.lldb` that will override the default lldb binary path used in debuginfo tests",
182182
},
183+
ChangeInfo {
184+
change_id: 123337,
185+
severity: ChangeSeverity::Info,
186+
summary: r#"The compiler profile now defaults to rust.debuginfo-level = "line-tables-only""#,
187+
},
183188
];

0 commit comments

Comments
 (0)