Description
There's a long standing Cargo issue, requesting the ability to strip symbols from built Rust binaries.
@alexcrichton suggested here that
This might be best done as a rust-lang/rust PR first which has access to target information to know what flag should be passed to the linker. For example this could be added as -C strip or something like that. We could then add a profile setting for Cargo to configure that on the Cargo side of things afterwards.
I'm opening this issue to discuss adding such a -C strip
flag and to track its implementation in the compiler.
Right now, it could be a simple boolean flag, which passes an additional option to the linker (since, AFAIK, most linkers have some sort of flag for stripping symbols from the final binaries).