-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
A-panicArea: Panicking machineryArea: Panicking machineryC-bugCategory: This is a bug.Category: This is a bug.I-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
-Cpanic=immediate-abort
was added in #146317 to replace -Zbuild-std-features=panic_immediate_abort
.
However, we've observed a double-digit binary size regression with that:
$ cargo +nightly-2025-09-23 bloat -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort --target $(rustc --print host-tuple) --features jvm --release --crates
[...]
File .text Size Crate
15.9% 23.0% 86.5KiB core
3.2% 4.6% 17.3KiB std
[...]
$ RUSTFLAGS="-Zunstable-options -Cpanic=immediate-abort" cargo +nightly-2025-09-24 bloat -Zbuild-std=std,panic_abort --target $(rustc --print host-tuple) --features jvm --release --crates
[...]
File .text Size Crate
15.9% 21.8% 116.5KiB core
11.3% 15.5% 82.6KiB std
5.1% 7.0% 37.4KiB gimli
1.7% 2.3% 12.5KiB addr2line
1.5% 2.0% 10.9KiB miniz_oxide
[...]
The size of core
and std
is notably increased, with gimli
, miniz_oxide
, and addr2line
starting to show up.
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
Metadata
Metadata
Assignees
Labels
A-panicArea: Panicking machineryArea: Panicking machineryC-bugCategory: This is a bug.Category: This is a bug.I-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.