rust/compiler/rustc_codegen_ssa/src/back
Matthias Krüger 644f06ec1f
Rollup merge of #141569 - workingjubilee:canonicalize-abi, r=bjorn3
Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi`

Our `conv_from_spec_abi`, `adjust_abi`, and `is_abi_supported` combine to give us a very confusing way of reasoning about what _actual_ calling convention we want to lower our code to and whether we want to compile the resulting code at all. Instead of leaving this code as a miniature adventure game in which someone tries to combine stateful mutations into a Rube Goldberg machine that will let them escape the maze and arrive at the promised land of codegen, we let `AbiMap` devour this complexity. Once you have an `AbiMap`, you can answer which `ExternAbi`s will lower to what `CanonAbi`s (and whether they will lower at all).

Removed:
- `conv_from_spec_abi` replaced by `AbiMap::canonize_abi`
- `adjust_abi` replaced by same
- `Conv::PreserveAll` as unused
- `Conv::Cold` as unused
- `enum Conv` replaced by `enum CanonAbi`

target-spec.json changes:
- If you have a target-spec.json then now your "entry-abi" key will be specified in terms of one of the `"{abi}"` strings Rust recognizes, e.g.
```json
    "entry-abi": "C",
    "entry-abi": "win64",
    "entry-abi": "aapcs",
```
2025-06-03 21:53:36 +02:00
..
apple refactor: Move Apple OSVersion (back) to rustc_target 2025-04-04 15:01:27 +02:00
link Support raw-dylib link kind on ELF 2025-02-26 19:09:51 +01:00
linker Rustfmt 2025-02-08 22:12:13 +00:00
rpath Rename is_like_osx to is_like_darwin 2025-03-25 21:53:52 +01:00
apple.rs refactor: Move env parsing of deployment target to rustc_session 2025-04-04 15:02:22 +02:00
archive.rs Retry if creating temp fails with access denied 2025-04-25 11:28:36 +00:00
command.rs feat(linker): check ARG_MAX on Unix platforms 2025-03-14 09:45:49 -04:00
link.rs Auto merge of #141750 - Noratrieb:gold-rush, r=bjorn3 2025-06-02 23:56:54 +00:00
linker.rs Revert "Fix linking statics on Arm64EC #140176" 2025-05-15 16:54:27 +08:00
lto.rs Mark all optimize methods and the codegen method as safe 2025-05-28 20:55:00 +00:00
metadata.rs Apply suggestions from code review 2025-05-05 12:34:09 -04:00
mod.rs refactor: Move env parsing of deployment target to rustc_session 2025-04-04 15:02:22 +02:00
rpath.rs Rename is_like_osx to is_like_darwin 2025-03-25 21:53:52 +01:00
symbol_export.rs compiler: change Conv to CanonAbi 2025-06-03 10:03:44 -07:00
write.rs Mark all optimize methods and the codegen method as safe 2025-05-28 20:55:00 +00:00