Skip to content

Conversation

@bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Oct 27, 2025

This way cargo will drop the unsupported crate types for crates that
specify multiple crate types.

This is a prerequisite for rust-lang/miri#4648.

Previously only --crate-type would be taken into account, not #![crate_type].
@rustbot
Copy link
Collaborator

rustbot commented Oct 27, 2025

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 27, 2025

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@bjorn3
Copy link
Member Author

bjorn3 commented Oct 27, 2025

By the way I noticed that if you specify a crate type on the cli and this crate type is not supported by either the target or (with this PR) codegen backend, the crate will be treated as a library, but --emit link produces no output files.

This way cargo will drop the unsupported crate types for crates that
specify multiple crate types.
@bjorn3 bjorn3 force-pushed the codegen_backend_crate_types branch from 4059118 to b443a59 Compare October 27, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants