make -Zmin-function-alignment a target modifier#143323
Open
folkertdev wants to merge 1 commit intorust-lang:mainfrom
Open
make -Zmin-function-alignment a target modifier#143323folkertdev wants to merge 1 commit intorust-lang:mainfrom
-Zmin-function-alignment a target modifier#143323folkertdev wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
|
Collaborator
|
The Miri subtree was changed cc @rust-lang/miri |
jieyouxu
reviewed
Jul 3, 2025
| @@ -0,0 +1,13 @@ | |||
| error: mixing `-Zmin-function-alignment` will cause an ABI mismatch in crate `incompatible_min_function_alignment` | |||
Member
There was a problem hiding this comment.
Discussion: when this isn't a language guarantee, it's almost like this should be a warning/warn-by-default lint and not an error, right?
the
-Zmin-function-alignmentflag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely
When this is a hint, then the current target modifier infra/error message might be a bit confusing
Contributor
Member
|
@folkertdev any updates on this? thanks |
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.
tracking issue: #82232
cc #136966 #142824
Make
-Zmin-function-alignmenta target modifier, as discussed in #136966. This change effectively broadens the definition of what a target modifier can be: combining crates with different values of this flag has no risk of creating UB (so far), but it is logically inconsistent.It is still up in the air whether the alignment provided by this flag will be a language guarantee.
r? @workingjubilee