Skip to content

Commit

Permalink
Auto merge of #129884 - RalfJung:forbidden-target-features, r=working…
Browse files Browse the repository at this point in the history
…jubilee

mark some target features as 'forbidden' so they cannot be (un)set with -Ctarget-feature

The context for this is rust-lang/rust#116344: some target features change the way floats are passed between functions. Changing those target features is unsound as code compiled for the same target may now use different ABIs.

So this introduces a new concept of "forbidden" target features (on top of the existing "stable " and "unstable" categories), and makes it a hard error to (un)set such a target feature. For now, the x86 and ARM feature `soft-float` is on that list. We'll have to make some effort to collect more relevant features, and similar features from other targets, but that can happen after the basic infrastructure for this landed. (These features are being collected in rust-lang/rust#131799.)

I've made this a warning for now to give people some time to speak up if this would break something.

MCP: rust-lang/compiler-team#780
  • Loading branch information
bors committed Nov 5, 2024
2 parents a4f21dc + cc0045d commit 0ee1f74
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 0ee1f74

Please sign in to comment.