cargo/config: build release binaries with fat lto

Reduce installer binary size with link-time optimisation.
This commit is contained in:
oopsbagel
2025-06-28 05:19:52 -07:00
parent 5d2a5a2577
commit 1ee35dad71
+3 -2
View File
@@ -25,9 +25,10 @@ rustflags = ["-C", "target-feature=+crt-static"]
linker = "rust-lld"
rustflags = ["-C", "target-feature=+crt-static"]
# keep line numbers in stack traces for non-firmware binaries
[profile.release]
# keep line numbers in stack traces for non-firmware binaries
debug = "limited"
lto = "fat"
strip = "debuginfo"
# optimizations to reduce the binary size of firmware binaries
@@ -35,7 +36,7 @@ strip = "debuginfo"
inherits = "release"
strip = true
opt-level = "z"
lto = true
lto = "fat"
codegen-units = 1
panic = "abort"
debug = false