Skip to content

Commit 94a59d6

Browse files
Strip lld-wrapper binaries
This cuts down on the amount of data we need to ship and users need to keep on disk for each Rust toolchain. As noted in the added comment, there's not much going on in these executables, so the added benefit of symbols and debuginfo isn't large, while the cost is not insignificant. This takes each of the binaries (we store 4 identical copies under different names) from 3.7MB to 384KB.
1 parent e21f4cd commit 94a59d6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Cargo.toml

+8
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ gimli.debug = 0
104104
miniz_oxide.debug = 0
105105
object.debug = 0
106106

107+
# These are very thin wrappers around executing lld with the right binary name.
108+
# Basically nothing within them can go wrong without having been explicitly logged anyway.
109+
# We ship these in every rustc tarball and even after compression they add up
110+
# to around 0.6MB of data every user needs to download (and 15MB on disk).
111+
[profile.release.package.lld-wrapper]
112+
debug = 0
113+
strip = true
114+
107115
[patch.crates-io]
108116
# See comments in `library/rustc-std-workspace-core/README.md` for what's going on
109117
# here

0 commit comments

Comments
 (0)