Skip to content

Conversation

@fneddy
Copy link
Contributor

@fneddy fneddy commented Jan 15, 2026

followup on #150766

to use the soft-float feature one need to also set the s390x-softfloat flag in the .rustc_abi target field. This will automatically enable the LLVM +soft-float feature flag. On normal compilation with the default ABI, soft-float is still marked incompatible! So the ABI cannot be be broken by accident.

open soft-float points from previous PR:

  • should there be a s390x-unknown-none-softfloat target?

r? @cuviper

to use soft-float one need to also set the `s390x-softfloat` flag in the .rustc_abi target field.
This will automatically enable the +soft-float feature. On normal compilation with the default
ABI soft-float is still marked incompatible. So the ABI cannot be be broken by accident.
@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 Jan 15, 2026
@tgross35
Copy link
Contributor

tgross35 commented Jan 15, 2026

Cc @RalfJung who is the expert in this bit of code.

to use the soft-float feature one need to also set the s390x-softfloat flag in the .rustc_abi target field. This will automatically enable the LLVM +soft-float feature flag. On normal compilation with the default ABI, soft-float is still marked incompatible! So the ABI cannot be be broken by accident.

There aren't any tests indicating how this is meant to be used; do you mean that attempting to use +soft-float is rejected via target properties? I.e., what happens when a binary built with +soft-float gets linked against the normal s390x-unknown-none libcore?

The ABI change can be covered with a simple test in tests/assembly-llvm/, using //@ add-minicore so it can build on all platforms. The test indicating that we reject mixing crates built with and without +soft-float can probably live in tests/ui/target_modifiers (one crate will live in auxiliary/, the other lives in that directory and gets the ABI-changing flags).

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

Labels

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.

4 participants