-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Remove compiler-builtins-{no-asm,mangled-names}
#144471
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
Open
tgross35
wants to merge
2
commits into
rust-lang:master
Choose a base branch
from
tgross35:compiler-builtins-asm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+0
−6
Conversation
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
This feature used to be for when Cranelift didn't support inline assembly, but its last uses were removed in 52933e0 ("Don't disable inline asm usage in compiler-builtins when the cranelift backend is enabled"). and cba05a7 ("Support naked functions"). This doesn't remove the feature from the `compiler-builtins` crate, that will be done separately in the subtree repo.
tgross35
added a commit
to tgross35/compiler-builtins
that referenced
this pull request
Jul 25, 2025
Assembly-related configuration was added in 1621c6d ("Use `specialized-div-rem` 1.0.0 for division algorithms") to account for Cranelift not yet supporting assembly. This hasn't been relevant for a while so remove the unused feature here. To keep miri tests working, replace one instance of `not(feature = "no-asm")` with `not(miri)`. This is the compiler-builtins portion of rust-lang/rust#144471.
Amanieu
approved these changes
Jul 25, 2025
tgross35
added a commit
to tgross35/compiler-builtins
that referenced
this pull request
Jul 25, 2025
Assembly-related configuration was added in 1621c6d ("Use `specialized-div-rem` 1.0.0 for division algorithms") to account for Cranelift not yet supporting assembly. This hasn't been relevant for a while so remove the unused feature here. To keep miri tests working, replace one instance of `not(feature = "no-asm")` with `not(miri)`. This is the compiler-builtins portion of rust-lang/rust#144471.
@bors r=Amanieu rollup |
tgross35
added a commit
to tgross35/compiler-builtins
that referenced
this pull request
Jul 25, 2025
Assembly-related configuration was added in 1621c6d ("Use `specialized-div-rem` 1.0.0 for division algorithms") to account for Cranelift not yet supporting assembly. This hasn't been relevant for a while, so we no longer need to gate `asm!` behind this configuration. Thus, remove `cfg(not(feature = "no-asm"))` in places where there is no generic fallback. There are other cases, however, where setting the `no-asm` configuration enables testing of generic version of builtins when there are platform- specific implementations available; these cases are left unchanged. This could be improved in the future. This is the compiler-builtins portion of rust-lang/rust#144471.
tgross35
added a commit
to tgross35/compiler-builtins
that referenced
this pull request
Jul 26, 2025
Assembly-related configuration was added in 1621c6d ("Use `specialized-div-rem` 1.0.0 for division algorithms") to account for Cranelift not yet supporting assembly. This hasn't been relevant for a while, so we no longer need to gate `asm!` behind this configuration. Thus, remove `cfg(not(feature = "no-asm"))` in places where there is no generic fallback. There are other cases, however, where setting the `no-asm` configuration enables testing of generic version of builtins when there are platform- specific implementations available; these cases are left unchanged. This could be improved in the future by exposing both versions for testing rather than using a configuration and running the entire testsuite twice. This is the compiler-builtins portion of rust-lang/rust#144471.
This config was added in 207de01 ("libary: Forward compiler-builtins "asm" and "mangled-names" feature") but it does not appear this has ever been used. The PR adding it (RUST-78472) says that this was exposed to help with configuration and points at the [Hermit Cargo config], but as far as I can tell, this feature name has never been mentioned in that repository's git history. Thus, clean up a seemingly unneeded feature. [Hermit Cargo config]: https://github.com/hermit-os/hermit-rs/blob/ab2b830930e6a9a98c8294997a8183feeabeda4a/.cargo/config
compiler-builtins-no-asm
compiler-builtins-{no-asm,mangled-names}
Added a commit to also remove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
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.
Remove
compiler-builtins-no-asm
This feature used to be for when Cranelift didn't support inline
assembly, but its last uses were removed in 52933e0 ("Don't disable
inline asm usage in compiler-builtins when the cranelift backend is
enabled"). and cba05a7 ("Support naked functions").
This doesn't remove the feature from the
compiler-builtins
crate, thatwill be done separately in the subtree repo.
Remove
compiler-builtins-mangled-names
This config was added in 207de01 ("libary: Forward
compiler-builtins "asm" and "mangled-names" feature") but it does not
appear this has ever been used. The PR adding it (#78472) says that
this was exposed to help with configuration and points at the Hermit
Cargo config, but as far as I can tell, this feature name has never
been mentioned in that repository's git history.
Thus, clean up a seemingly unneeded feature.
r? @Amanieu
cc @bjorn3