Skip to content

riscv: promote d, e, and f target_features to CfgStableToggleUnstable#156188

Open
romancardenas wants to merge 3 commits into
rust-lang:mainfrom
romancardenas:riscv-target-feature-cfg-stable-toggle-unstable
Open

riscv: promote d, e, and f target_features to CfgStableToggleUnstable#156188
romancardenas wants to merge 3 commits into
rust-lang:mainfrom
romancardenas:riscv-target-feature-cfg-stable-toggle-unstable

Conversation

@romancardenas
Copy link
Copy Markdown
Contributor

@romancardenas romancardenas commented May 5, 2026

This PR is a continuation of #155962

It uses the new CfgStableToggleUnstable stability level for the "d", "e", and "f" target_features of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance.

The PR is related to #150257

r? @RalfJung

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 5, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 5, 2026

RalfJung is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_target/src/target_features.rs
@romancardenas romancardenas force-pushed the riscv-target-feature-cfg-stable-toggle-unstable branch from 1397678 to 4e9a3de Compare May 6, 2026 13:21
@RalfJung
Copy link
Copy Markdown
Member

Looks good on the test side, thanks. :)
Cc @Amanieu

Let's nominate this for the @rust-lang/lang. This is about stabilizing the use of the "d", "e", and "f" RISC-V target feature for use in cfg only. IOW, this lets code check whether the features are available, but it doesn't let code enable or disable the features. That should therefore be entirely harmless ABI-wise.

@RalfJung RalfJung added the I-lang-nominated Nominated for discussion during a lang team meeting. label May 10, 2026
@traviscross traviscross added the P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang label May 10, 2026
@RalfJung RalfJung added S-waiting-on-t-lang Status: Awaiting decision from T-lang and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 13, 2026
@traviscross traviscross added the I-lang-radar Items that are on lang's radar and will need eventual work or consideration. label May 13, 2026
@joshtriplett
Copy link
Copy Markdown
Member

Blocked waiting on feedback from @Amanieu.

@Amanieu
Copy link
Copy Markdown
Member

Amanieu commented May 13, 2026

I don't see any harm in stabilizing those. The real issues comes from selectively enabling these on a per-function basis, which this doesn't do.

@traviscross traviscross added the T-lang Relevant to the language team label May 16, 2026
@traviscross
Copy link
Copy Markdown
Contributor

Thanks @Amanieu.

@rfcbot fcp merge lang

@rust-rfcbot
Copy link
Copy Markdown
Collaborator

rust-rfcbot commented May 16, 2026

Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. I-lang-nominated Nominated for discussion during a lang team meeting. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. S-waiting-on-t-lang Status: Awaiting decision from T-lang T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants