Skip to content

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jul 25, 2025

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, that
will 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

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.
@rustbot rustbot added 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. labels 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.
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.
@tgross35
Copy link
Contributor Author

@bors r=Amanieu rollup

@bors
Copy link
Collaborator

bors commented Jul 25, 2025

📌 Commit a076bd8 has been approved by Amanieu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels 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 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
@tgross35 tgross35 changed the title Remove compiler-builtins-no-asm Remove compiler-builtins-{no-asm,mangled-names} Jul 26, 2025
@tgross35
Copy link
Contributor Author

tgross35 commented Jul 26, 2025

Added a commit to also remove compiler-builtins-mangled-names since that is also unused, rather than creating a separate PR to conflict with this one.

@tgross35 tgross35 requested a review from Amanieu July 26, 2025 00:32
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 26, 2025
@Amanieu
Copy link
Member

Amanieu commented Jul 27, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 27, 2025

📌 Commit 51c5f19 has been approved by Amanieu

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 27, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 27, 2025
…Amanieu

Remove `compiler-builtins-{no-asm,mangled-names}`

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, that
will 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 (rust-lang#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
tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Jul 27, 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.
tgross35 added a commit to rust-lang/compiler-builtins that referenced this pull request Jul 27, 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.
bors added a commit that referenced this pull request Jul 27, 2025
Rollup of 7 pull requests

Successful merges:

 - #143289 (Remove `[T]::array_chunks(_mut)`)
 - #143607 (Port the proc macro attributes to the new attribute parsing infrastructure)
 - #144471 (Remove `compiler-builtins-{no-asm,mangled-names}`)
 - #144495 (bump cargo_metadata)
 - #144523 (rustdoc: save target modifiers)
 - #144534 (check_static_item: explain should_check_for_sync choices)
 - #144535 (miri: for ABI mismatch errors, say which argument is the problem)

Failed merges:

 - #144536 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 28, 2025
Rollup of 6 pull requests

Successful merges:

 - #143607 (Port the proc macro attributes to the new attribute parsing infrastructure)
 - #144471 (Remove `compiler-builtins-{no-asm,mangled-names}`)
 - #144495 (bump cargo_metadata)
 - #144523 (rustdoc: save target modifiers)
 - #144534 (check_static_item: explain should_check_for_sync choices)
 - #144535 (miri: for ABI mismatch errors, say which argument is the problem)

Failed merges:

 - #144536 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1e888ed into rust-lang:master Jul 28, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 28, 2025
rust-timer added a commit that referenced this pull request Jul 28, 2025
Rollup merge of #144471 - tgross35:compiler-builtins-asm, r=Amanieu

Remove `compiler-builtins-{no-asm,mangled-names}`

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, that
will 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.

[Hermit Cargo config]: https://github.com/hermit-os/hermit-rs/blob/ab2b830930e6a9a98c8294997a8183feeabeda4a/.cargo/config
@tgross35 tgross35 deleted the compiler-builtins-asm branch July 28, 2025 05:33
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Jul 28, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#143607 (Port the proc macro attributes to the new attribute parsing infrastructure)
 - rust-lang/rust#144471 (Remove `compiler-builtins-{no-asm,mangled-names}`)
 - rust-lang/rust#144495 (bump cargo_metadata)
 - rust-lang/rust#144523 (rustdoc: save target modifiers)
 - rust-lang/rust#144534 (check_static_item: explain should_check_for_sync choices)
 - rust-lang/rust#144535 (miri: for ABI mismatch errors, say which argument is the problem)

Failed merges:

 - rust-lang/rust#144536 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jul 30, 2025
…Amanieu

Remove `compiler-builtins-{no-asm,mangled-names}`

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, that
will 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 (rust-lang#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
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jul 30, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#143607 (Port the proc macro attributes to the new attribute parsing infrastructure)
 - rust-lang#144471 (Remove `compiler-builtins-{no-asm,mangled-names}`)
 - rust-lang#144495 (bump cargo_metadata)
 - rust-lang#144523 (rustdoc: save target modifiers)
 - rust-lang#144534 (check_static_item: explain should_check_for_sync choices)
 - rust-lang#144535 (miri: for ABI mismatch errors, say which argument is the problem)

Failed merges:

 - rust-lang#144536 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to rust-lang/stdarch that referenced this pull request Jul 31, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#143607 (Port the proc macro attributes to the new attribute parsing infrastructure)
 - rust-lang/rust#144471 (Remove `compiler-builtins-{no-asm,mangled-names}`)
 - rust-lang/rust#144495 (bump cargo_metadata)
 - rust-lang/rust#144523 (rustdoc: save target modifiers)
 - rust-lang/rust#144534 (check_static_item: explain should_check_for_sync choices)
 - rust-lang/rust#144535 (miri: for ABI mismatch errors, say which argument is the problem)

Failed merges:

 - rust-lang/rust#144536 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 5, 2025
Assembly-related configuration was added in 1621c6dbf9eb ("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#144471.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Aug 12, 2025
Assembly-related configuration was added in 1621c6dbf9eb ("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#144471.
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. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants