Skip to content

Commit 36315df

Browse files
committed
change build-dependencies defaults for faster compile times
Turning off debuginfo makes a noticeable difference. Backtraces in build scripts, and opting into backtraces for proc-macros on nightly, can be worse. Debuggability can be improved by changing settings back, and this will be documented for the rare cases where it's needed.
1 parent 1a052ae commit 36315df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/cargo/core/profiles.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,11 @@ impl ProfileMaker {
408408
// basically turning down the optimization level and avoid limiting
409409
// codegen units. This ensures that we spend little time optimizing as
410410
// well as enabling parallelism by not constraining codegen units.
411+
// Turning off debuginfo also allows the compiler to noticeably perform
412+
// less work.
411413
profile.opt_level = InternedString::new("0");
412414
profile.codegen_units = None;
415+
profile.debuginfo = None;
413416
}
414417
// ... and next comes any other sorts of overrides specified in
415418
// profiles, such as `[profile.release.build-override]` or

0 commit comments

Comments
 (0)