Auto merge of #129063 - the8472:cold-opt-size, r=Amanieu

Apply size optimizations to panic machinery and some cold functions

* std dependencies gimli and addr2line are now built with opt-level=s
* various panic-related methods and `#[cold]` methods are now marked `#[optimize(size)]`

Panics should be cold enough that it doesn't make sense to optimize them for speed. The only tradeoff here is if someone does a lot of backtrace captures (without panics) and printing then the opt-level change might impact their perf.

Seems to be the first use of the optimize attribute. Tracking issue #54882
This commit is contained in:
bors
2024-09-02 00:58:50 +00:00
10 changed files with 26 additions and 9 deletions

View File

@@ -306,10 +306,12 @@
#![feature(negative_impls)]
#![feature(never_type)]
#![feature(no_sanitize)]
#![feature(optimize_attribute)]
#![feature(prelude_import)]
#![feature(rustc_attrs)]
#![feature(rustdoc_internals)]
#![feature(staged_api)]
#![feature(stmt_expr_attributes)]
#![feature(thread_local)]
#![feature(try_blocks)]
#![feature(type_alias_impl_trait)]