Skip to content

Ignore target feature test when LLVM fails to compile minicore - #161257

Open
TimNN wants to merge 1 commit into
rust-lang:mainfrom
TimNN:no-minicore
Open

Ignore target feature test when LLVM fails to compile minicore#161257
TimNN wants to merge 1 commit into
rust-lang:mainfrom
TimNN:no-minicore

Conversation

@TimNN

@TimNN TimNN commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

llvm/llvm-project#111334 made LLVM reject certain target feature + ABI mismatches (ARM hard / soft float) which means that minicore now fails to build with errors like error: <unknown>:0:0: in function _RNvXsc_Cs4Af2OiBEA1T_8minicoreiNtB5_3Add3add i32 (i32, i32): calling convention is hard-float, but floating-point registers are unavailable

This PR ignores the test where this currently happens on LLVM 24, assuming that if LLVM is now rejecting this, we should turn the rust-side warning into an error as well. Created #161276 to track that.

r? @RalfJung (since you worked ~recently on these, including migrating them to minicore)

@rustbot label llvm-main

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

rustbot commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

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

@rustbot rustbot added the llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) label Aug 17, 2026
@RalfJung

Copy link
Copy Markdown
Member

What exactly happens when LLVM "rejects" these?

@TimNN

TimNN commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

In the linked CI failure we see error: <unknown>:0:0: in function _RNvXsc_Cs4Af2OiBEA1T_8minicoreiNtB5_3Add3add i32 (i32, i32): calling convention is hard-float, but floating-point registers are unavailable when the test tries to compile minicore.

@RalfJung

Copy link
Copy Markdown
Member

If these are turning into hard errors in LLVM, I'd say it is time to make them hard errors in Rust so it's impossible to hit those LLVM errors via rustc. Would you be willing to look into that or do you just want to get the CI green ASAP?

Comment thread tests/ui/target-feature/abi-required-target-feature-missing-in-target-cpu.rs Outdated
@TimNN

TimNN commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

The main priority was getting CI green again, because it's annoying if multiple failures accumulate, but that was effectively achieved by applying the llvm-main label.

I don't have time to work on making this a hard error on the Rust side at the moment. (I assume it's going to be a bit of a process with crater + fcp).

Ignoring the ARM version of the test on LLVM 24 seems like a reasonable interim solution, I'll update the PR tomorrow.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 17, 2026
@rustbot

rustbot commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@RalfJung

Copy link
Copy Markdown
Member

(I assume it's going to be a bit of a process with crater + fcp).

Crater won't help here, but yes this will need FCP.

@TimNN TimNN changed the title Do not use minicore when LLVM fails to compile it Ignore target feature test when LLVM fails to compile minicore Aug 18, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 18, 2026
@RalfJung

Copy link
Copy Markdown
Member

Thanks!
@bors r+ rollup

Thinking about it some more, if we make this a hard error I guess we'll have to remove the minicore anyway as otherwise the error occurs in the wrong spot. That's a bit annoying. Ideally we'd have a way for minicore to not inherit the flags from the test itself (#147881)... we'll cross that bridge when we get there.

@rust-bors

rust-bors Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0a1912f has been approved by RalfJung

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Aug 18, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 18, 2026
Ignore target feature test when LLVM fails to compile minicore

llvm/llvm-project#111334 made LLVM reject certain target feature + ABI mismatches (ARM hard / soft float) which means that minicore now [fails to build](https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/48076/canvas?sid=01a00f60-fa22-4f35-a854-0b6d1c302123) with errors like `error: <unknown>:0:0: in function _RNvXsc_Cs4Af2OiBEA1T_8minicoreiNtB5_3Add3add i32 (i32, i32): calling convention is hard-float, but floating-point registers are unavailable`

This PR ignores the test where this currently happens on LLVM 24, assuming that if LLVM is now rejecting this, we should turn the rust-side warning into an error as well. Created rust-lang#161276 to track that.

r? @RalfJung (since you worked ~recently on these, including migrating them to minicore)

@rustbot label llvm-main
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 18, 2026
Ignore target feature test when LLVM fails to compile minicore

llvm/llvm-project#111334 made LLVM reject certain target feature + ABI mismatches (ARM hard / soft float) which means that minicore now [fails to build](https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/48076/canvas?sid=01a00f60-fa22-4f35-a854-0b6d1c302123) with errors like `error: <unknown>:0:0: in function _RNvXsc_Cs4Af2OiBEA1T_8minicoreiNtB5_3Add3add i32 (i32, i32): calling convention is hard-float, but floating-point registers are unavailable`

This PR ignores the test where this currently happens on LLVM 24, assuming that if LLVM is now rejecting this, we should turn the rust-side warning into an error as well. Created rust-lang#161276 to track that.

r? @RalfJung (since you worked ~recently on these, including migrating them to minicore)

@rustbot label llvm-main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

3 participants