Skip to content

make target feature ABI check a hard error on ARM - #161280

Open
RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:abi-required-target-feature-arm
Open

make target feature ABI check a hard error on ARM#161280
RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:abi-required-target-feature-arm

Conversation

@RalfJung

@RalfJung RalfJung commented Aug 18, 2026

Copy link
Copy Markdown
Member

With LLVM 24, we now (finally) get hard errors from the backend for "you want ABI X but the target features required for that ABI are missing", at least on the ARM backend:

error: <unknown>:0:0: in function _RNvXsc_Cs4Af2OiBEA1T_8minicoreiNtB5_3Add3add i32 (i32, i32): calling convention is hard-float, but floating-point registers are unavailable

That's not a pretty error, so let's make rust emit a hard error before we even get there -- just on ARM for now, matching LLVM. We have emitted a future-compat error for this since Rust 1.86 (#136147, #134794). I'm not making it a hard error everywhere since for other targets we are still figuring out the exact things we have to check, and it's better to do that without risking new hard errors.

Since this is a new hard error, this probably requires FCP. I am not sure for which team -- @rust-lang/lang is often involved for target feature things, but this is mostly about rejecting invalid -C flags which are handled by t-compiler (@davidtwco @BoxyUwU).

Fixes #161276
Tracking issue #116344
Cc @TimNN

@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 Aug 18, 2026
@rustbot

rustbot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 15 candidates

@RalfJung RalfJung added the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Aug 18, 2026
@RalfJung
RalfJung force-pushed the abi-required-target-feature-arm branch from 4841c57 to ac3223c Compare August 18, 2026 09:31
@RalfJung

Copy link
Copy Markdown
Member Author

Pinging maintainers of affected targets
@rustbot ping arm-maintainers

@rustbot

rustbot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Error: This team (arm-maintainers) cannot be pinged via this command; it may need to be added to triagebot.toml on the default branch.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LLVM 24 rejects target feature / ABI mismatch that Rust only warns about

3 participants