Skip to content

Commit 3acc407

Browse files
Set debuginfo-level = "line-tables-only" for 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 debuginfo by setting "line-tables-only" at the cost of only 150~200 MB.
1 parent 7bb4f08 commit 3acc407

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
@@ -175,4 +175,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
175175
severity: ChangeSeverity::Warning,
176176
summary: "The deprecated field `changelog-seen` has been removed. Using that field in `config.toml` from now on will result in breakage.",
177177
},
178+
ChangeInfo {
179+
change_id: 123337,
180+
severity: ChangeSeverity::Info,
181+
summary: r#"The compiler profile now defaults to rust.debuginfo-level = "line-tables-only""#,
182+
},
178183
];

0 commit comments

Comments
 (0)