Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a -C embed-binary=no compiler option #137998

Open
Zoxc opened this issue Mar 4, 2025 · 1 comment
Open

Add a -C embed-binary=no compiler option #137998

Zoxc opened this issue Mar 4, 2025 · 1 comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Zoxc
Copy link
Contributor

Zoxc commented Mar 4, 2025

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 rust-lang/cargo#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.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 4, 2025
@bjorn3
Copy link
Member

bjorn3 commented Mar 4, 2025

Maybe call it -Cembed-bitcode=only as either bitcode or object files need to be present.

@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants