build: line tables only and unpacked debuginfo, so the dev tree stops filling the disk
DWARF is ~97% of what rustc writes here: the largest `benilla-app` codegen unit measured 145 MB, of which 61 MB was `.debug_str` and 13 MB `.debug_info` against 1.5 MB of `.text`. That carried a 1.5 GB `libbenilla_app` rlib, a 2.9 GB test binary and an 82 GB `target/debug`. `.debug_line` survives, so a backtrace and `gdb bt` still name a file and a line; `split-debuginfo` leaves the rest in the object files rather than copying it into the linked binary.
This commit is contained in:
+15
-2
@@ -44,15 +44,28 @@ lua-src = { path = "third_party/lua-src" }
|
||||
kira = { path = "third_party/kira" }
|
||||
|
||||
# Dependencies at opt-level 3 in dev: at opt-level 0, avian/parry collision drops a run to <1 fps.
|
||||
# Line tables only, and never packed into the binary, for the reason under `[profile.dev]` below.
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 3
|
||||
debug = "line-tables-only"
|
||||
split-debuginfo = "unpacked"
|
||||
|
||||
# Our crates at opt-level 1: Bevy's generic hot paths monomorphize into them, and at opt-level 0
|
||||
# Stormwind drops from a pinned 60 fps to ~45; the warm incremental rebuild cost is ~0.
|
||||
[profile.dev]
|
||||
opt-level = 1
|
||||
|
||||
# No debuginfo trimming: `debug = "line-tables-only"` measures no recurring win on macOS + sccache.
|
||||
# Line tables only, not `debug = 2`. DWARF is ~97% of what rustc writes for this tree: the largest
|
||||
# benilla-app codegen unit measured 145 MB, of which 61 MB was `.debug_str` and 13 MB
|
||||
# `.debug_info` against 1.5 MB of `.text`. Carrying that cost a 1.5 GB `libbenilla_app` rlib, a
|
||||
# 2.9 GB test binary and an 82 GB `target/debug`, which filled the disk on a 1 TB volume and made
|
||||
# every write slower for it. `.debug_line` survives, so a panic backtrace and `gdb`'s `bt` still
|
||||
# name a file and a line; `split-debuginfo` leaves the rest in the object files rather than copying
|
||||
# it into the linked binary, which is what the link step paid for.
|
||||
#
|
||||
# This supersedes "no debuginfo trimming measures no recurring win", which was measured on macOS
|
||||
# with sccache and no disk pressure. Re-measure on macOS before assuming it holds there.
|
||||
debug = "line-tables-only"
|
||||
split-debuginfo = "unpacked"
|
||||
|
||||
# The shipping build (`--profile ship`): fat LTO measures -1.0 cpu_ms (-5 %) against `release`,
|
||||
# which stays the measured profile because fat LTO's link time would tax every iteration.
|
||||
|
||||
Reference in New Issue
Block a user