Allow codegen backends to indicate which crate types they support#148177
Merged
bors merged 3 commits intorust-lang:masterfrom Oct 28, 2025
Merged
Allow codegen backends to indicate which crate types they support#148177bors merged 3 commits intorust-lang:masterfrom
bors merged 3 commits intorust-lang:masterfrom
Conversation
Previously only --crate-type would be taken into account, not #![crate_type].
Collaborator
|
Some changes occurred in compiler/rustc_codegen_ssa |
Collaborator
Member
Author
|
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 |
This way cargo will drop the unsupported crate types for crates that specify multiple crate types.
4059118 to
b443a59
Compare
WaffleLapkin
approved these changes
Oct 28, 2025
554a58d to
9fc1378
Compare
Member
Author
|
@bors r=WaffleLapkin |
Collaborator
Collaborator
bors
added a commit
that referenced
this pull request
Oct 28, 2025
…apkin Allow codegen backends to indicate which crate types they support 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.
Member
|
@bors retry (yielding to a stable PR) |
rust-timer
added a commit
that referenced
this pull request
Oct 28, 2025
Rollup merge of #148177 - bjorn3:codegen_backend_crate_types, r=WaffleLapkin Allow codegen backends to indicate which crate types they support 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.