feat: handle -z x86-64-* ISA needed#1320
Merged
Merged
Conversation
mati865
commented
Nov 20, 2025
Comment on lines
+1389
to
+1420
| .sub_option( | ||
| "x86-64-baseline", | ||
| "Mark x86-64-baseline ISA as needed", | ||
| |args, _modifier_stack, _value| { | ||
| args.z_isa = GNU_PROPERTY_X86_ISA_1_BASELINE; | ||
| Ok(()) | ||
| }, | ||
| ) | ||
| .sub_option( | ||
| "x86-64-v2", | ||
| "Mark x86-64-v2 ISA as needed", | ||
| |args, _modifier_stack, _value| { | ||
| args.z_isa = GNU_PROPERTY_X86_ISA_1_V2; | ||
| Ok(()) | ||
| }, | ||
| ) | ||
| .sub_option( | ||
| "x86-64-v3", | ||
| "Mark x86-64-v3 ISA as needed", | ||
| |args, _modifier_stack, _value| { | ||
| args.z_isa = GNU_PROPERTY_X86_ISA_1_V3; | ||
| Ok(()) | ||
| }, | ||
| ) | ||
| .sub_option( | ||
| "x86-64-v4", | ||
| "Mark x86-64-v4 ISA as needed", | ||
| |args, _modifier_stack, _value| { | ||
| args.z_isa = GNU_PROPERTY_X86_ISA_1_V4; | ||
| Ok(()) | ||
| }, | ||
| ) |
Member
Author
There was a problem hiding this comment.
Should we list them when on non x86_64?
Member
There was a problem hiding this comment.
We support cross-linking, so I think we should list them
| pub(crate) error_unresolved_symbols: bool, | ||
| pub(crate) allow_multiple_definitions: bool, | ||
| pub(crate) z_interpose: bool, | ||
| pub(crate) z_isa: u32, |
Member
Author
There was a problem hiding this comment.
Maybe Option<NonZeroU32> would be better?
Member
There was a problem hiding this comment.
Option<NonZeroU32> looks like it would fit nicely here, but either is fine by me.
-z,x86-64-* ISA needed
davidlattimore
approved these changes
Nov 20, 2025
Comment on lines
+1389
to
+1420
| .sub_option( | ||
| "x86-64-baseline", | ||
| "Mark x86-64-baseline ISA as needed", | ||
| |args, _modifier_stack, _value| { | ||
| args.z_isa = GNU_PROPERTY_X86_ISA_1_BASELINE; | ||
| Ok(()) | ||
| }, | ||
| ) | ||
| .sub_option( | ||
| "x86-64-v2", | ||
| "Mark x86-64-v2 ISA as needed", | ||
| |args, _modifier_stack, _value| { | ||
| args.z_isa = GNU_PROPERTY_X86_ISA_1_V2; | ||
| Ok(()) | ||
| }, | ||
| ) | ||
| .sub_option( | ||
| "x86-64-v3", | ||
| "Mark x86-64-v3 ISA as needed", | ||
| |args, _modifier_stack, _value| { | ||
| args.z_isa = GNU_PROPERTY_X86_ISA_1_V3; | ||
| Ok(()) | ||
| }, | ||
| ) | ||
| .sub_option( | ||
| "x86-64-v4", | ||
| "Mark x86-64-v4 ISA as needed", | ||
| |args, _modifier_stack, _value| { | ||
| args.z_isa = GNU_PROPERTY_X86_ISA_1_V4; | ||
| Ok(()) | ||
| }, | ||
| ) |
Member
There was a problem hiding this comment.
We support cross-linking, so I think we should list them
| pub(crate) error_unresolved_symbols: bool, | ||
| pub(crate) allow_multiple_definitions: bool, | ||
| pub(crate) z_interpose: bool, | ||
| pub(crate) z_isa: u32, |
Member
There was a problem hiding this comment.
Option<NonZeroU32> looks like it would fit nicely here, but either is fine by me.
-z,x86-64-* ISA needed-z x86-64-* ISA needed
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.
No description provided.