rust/compiler/rustc_target/src
bors d19980e1ce Auto merge of #117500 - RalfJung:aggregate-abi, r=davidtwco
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](https://github.com/rust-lang/rust/pull/117351#issuecomment-1788495503) 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 https://github.com/rust-lang/rust/pull/80594 that got reverted in https://github.com/rust-lang/rust/pull/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 https://github.com/rust-lang/rust/issues/115845
2023-11-19 18:42:20 +00:00
..
abi Auto merge of #117500 - RalfJung:aggregate-abi, r=davidtwco 2023-11-19 18:42:20 +00:00
asm update the registers of csky 2023-10-21 23:42:09 +08:00
spec Auto merge of #117364 - BlackHoleFox:farewell-bitcode-no-remorse, r=davidtwco 2023-11-19 05:35:08 +00:00
json.rs Use preserve_mostcc for extern "rust-cold" 2023-08-26 17:42:59 -07:00
lib.rs Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
tests.rs Use serde_json for target spec json 2022-06-03 16:46:19 +00:00