Skip to content

Commit 6bb7798

Browse files
committed
Auto merge of rust-lang#123964 - Mark-Simulacrum:shrink-bt, r=<try>
Shrink backtrace generation in std r? `@Mark-Simulacrum` (for perf)
2 parents 5dcb678 + 3f3b3b3 commit 6bb7798

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Cargo.toml

+10
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,23 @@ overflow-checks = false
9090
# (more data to chew through) and binaries to be larger without really all that
9191
# much benefit. This section turns them all to down to have no debuginfo which
9292
# helps to improve link times a little bit.
93+
#
94+
# We also trim down the binary size of generated code by telling LLVM to
95+
# optimize for size. This code should not be particularly hot, so there's not
96+
# much advantage in making it fast (vs. making it small).
9397
[profile.release.package]
9498
addr2line.debug = 0
9599
adler.debug = 0
96100
gimli.debug = 0
97101
miniz_oxide.debug = 0
98102
object.debug = 0
99103
rustc-demangle.debug = 0
104+
addr2line.opt-level = "z"
105+
adler.opt-level = "z"
106+
gimli.opt-level = "z"
107+
miniz_oxide.opt-level = "z"
108+
object.opt-level = "z"
109+
rustc-demangle.opt-level = "z"
100110

101111
# These are very thin wrappers around executing lld with the right binary name.
102112
# Basically nothing within them can go wrong without having been explicitly logged anyway.

0 commit comments

Comments
 (0)