Skip to content

Commit

Permalink
Auto merge of #117500 - RalfJung:aggregate-abi, r=davidtwco
Browse files Browse the repository at this point in the history
Ensure sanity of all computed ABIs

This moves the ABI sanity assertions from the codegen backend to the ABI computation logic. Sadly, due to past mistakes, we [have to](rust-lang/rust#117351 (comment)) be able to compute a sane ABI for nonsensical function types like `extern "C" fn(str) -> str`.  So to make the sanity check pass we first need to make all ABI adjustment deal with unsized types... and we have no shared infrastructure for those adjustments, so that's a bunch of copy-paste. At least we have assertions failing loudly when one accidentally sets a different mode for an unsized argument.

To achieve this, this re-lands the parts of rust-lang/rust#80594 that got reverted in rust-lang/rust#81388.  To avoid breaking wasm ABI again, that ABI now explicitly opts-in to the (wrong, broken) ABI that we currently keep for backwards compatibility. That's still better than having *every* ABI use the wrong broken default!

Cc `@bjorn3`
Fixes rust-lang/rust#115845
  • Loading branch information
bors committed Nov 19, 2023
2 parents b215fe0 + 80c8bac commit 6e5b090
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 6e5b090

Please sign in to comment.