Skip to content

Commit e5aae12

Browse files
committed
Add optimize(size) to some particularly large functions
1 parent 9d2c34e commit e5aae12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/symbolize/gimli.rs

+4
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ struct Context<'a> {
114114
}
115115

116116
impl<'data> Context<'data> {
117+
// #[feature(optimize_attr)] is enabled when we're built inside libstd
118+
#[cfg_attr(backtrace_in_libstd, optimize(size))]
117119
fn new(
118120
stash: &'data Stash,
119121
object: Object<'data>,
@@ -355,6 +357,8 @@ impl Cache {
355357
}
356358

357359
// unsafe because this is required to be externally synchronized
360+
// #[feature(optimize_attr)] is enabled when we're built inside libstd
361+
#[cfg_attr(backtrace_in_libstd, optimize(size))]
358362
unsafe fn with_global(f: impl FnOnce(&mut Self)) {
359363
// A very small, very simple LRU cache for debug info mappings.
360364
//

0 commit comments

Comments
 (0)