Add a `-C embed-binary=no` compiler option
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
It would be useful to ask rustc to not embed object code in a rlib when doing LTO. I suggest adding a -C embed-binary=no compiler option similar to -C embed-bitcode=no.
This would allow https://github.com/rust-lang/cargo/issues/14575 to be fixed without incurring a compile time cost, as Cargo misuses -C linker-plugin-lto as a -C embed-binary=no option, which currently leads to miscompilations.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing rustc's existing handling of the analogous -C embed-bitcode=no option and the LTO path that produces rlibs. Determine where the new -C embed-binary=no setting must be accepted and applied, then verify that Cargo's use case no longer causes miscompilations without adding a compile-time cost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100