Closed
Description
Problem
I am on glibc based linux and I installed the target x86_64-unknown-linux-musl
additionally using rustup
.
Rust intends to strip the debuginfo from release binaries, which seems to work fine for x86_64-unknown-linux-gnu
, but not for x86_64-unknown-linux-musl
.
These are the sizes I get for cargo build --release
and a fresh Cargo.toml
from cargo new
(hello world) compared to what I get, when explicitly configuring strip = "debuginfo"
:
Configuration | Size |
---|---|
gnu | 407K |
musl | 3.8M |
gnu + strip | 407K |
musl + strip | 510K |
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
cargo 1.79.0-nightly (d438c80c4 2024-03-19)
release: 1.79.0-nightly
commit-hash: d438c80c45c24be676ef5867edc79d0a14910efe
commit-date: 2024-03-19
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Arch Linux [64-bit]