You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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":
Thanks for the report! Can you confirm whether are you using the --target flag for both commands? I can see that the --target flag is indeed not working.
Indeed, I was not using --target for my default x86_64-unknown-linux-gnu. If I do, it will also omit to strip the binary.
So this seems purely related to the --target flag.
kamulos
changed the title
Automatic strip = "debuginfo" in release mode does not work when using --target x86_64-unknown-linux-musl
Automatic strip = "debuginfo" in release mode does not work when using --target flag
Mar 21, 2024
Problem
I am on glibc based linux and I installed the target
x86_64-unknown-linux-musl
additionally usingrustup
.Rust intends to strip the debuginfo from release binaries, which seems to work fine for
x86_64-unknown-linux-gnu
, but not forx86_64-unknown-linux-musl
.These are the sizes I get for
cargo build --release
and a freshCargo.toml
fromcargo new
(hello world) compared to what I get, when explicitly configuringstrip = "debuginfo"
:Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: