about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-06 16:07:50 +0100
committerGitHub <noreply@github.com>2024-01-06 16:07:50 +0100
commit5f0f02810684e1d08c5d1a38acff79f5300086f0 (patch)
treefec880caea510237cd7c1d3ee63f0509b8f5b23d
parent6ab546e034471e0b3e5373a569fbf18759930189 (diff)
parent94a59d6f62c36e0f80a4fa36aebe2878a20079e7 (diff)
downloadrust-5f0f02810684e1d08c5d1a38acff79f5300086f0.tar.gz
rust-5f0f02810684e1d08c5d1a38acff79f5300086f0.zip
Rollup merge of #119661 - Mark-Simulacrum:shrink-lld-wrapper, r=Kobzol
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.
-rw-r--r--Cargo.toml8
1 files changed, 8 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 9b11ae8744b..03915078838 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -104,6 +104,14 @@ gimli.debug = 0
 miniz_oxide.debug = 0
 object.debug = 0
 
+# These are very thin wrappers around executing lld with the right binary name.
+# Basically nothing within them can go wrong without having been explicitly logged anyway.
+# We ship these in every rustc tarball and even after compression they add up
+# to around 0.6MB of data every user needs to download (and 15MB on disk).
+[profile.release.package.lld-wrapper]
+debug = 0
+strip = true
+
 [patch.crates-io]
 # See comments in `library/rustc-std-workspace-core/README.md` for what's going on
 # here