Skip to content

Commit 8da6239

Browse files
committedJun 13, 2025·
Auto merge of #142443 - matthiaskrgr:rollup-l1l6d0v, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #128425 (Make `missing_fragment_specifier` an unconditional error) - #135927 (retpoline and retpoline-external-thunk flags (target modifiers) to enable retpoline-related target features) - #140770 (add `extern "custom"` functions) - #142176 (tests: Split dont-shuffle-bswaps along opt-levels and arches) - #142248 (Add supported asm types for LoongArch32) - #142267 (assert more in release in `rustc_ast_lowering`) - #142274 (Update the stdarch submodule) - #142276 (Update dependencies in `library/Cargo.lock`) - #142308 (Upgrade `object`, `addr2line`, and `unwinding` in the standard library) Failed merges: - #140920 (Extract some shared code from codegen backend target feature handling) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl try-job: test-various
2 parents 0d6ab20 + 71490ff commit 8da6239

File tree

91 files changed

+1444
-529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1444
-529
lines changed
 

‎compiler/rustc_abi/src/canon_abi.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ pub enum CanonAbi {
2828
Rust,
2929
RustCold,
3030

31+
/// An ABI that rustc does not know how to call or define.
32+
Custom,
33+
3134
/// ABIs relevant to 32-bit Arm targets
3235
Arm(ArmCall),
3336
/// ABI relevant to GPUs: the entry point for a GPU kernel
@@ -57,6 +60,7 @@ impl fmt::Display for CanonAbi {
5760
CanonAbi::C => ExternAbi::C { unwind: false },
5861
CanonAbi::Rust => ExternAbi::Rust,
5962
CanonAbi::RustCold => ExternAbi::RustCold,
63+
CanonAbi::Custom => ExternAbi::Custom,
6064
CanonAbi::Arm(arm_call) => match arm_call {
6165
ArmCall::Aapcs => ExternAbi::Aapcs { unwind: false },
6266
ArmCall::CCmseNonSecureCall => ExternAbi::CCmseNonSecureCall,

‎compiler/rustc_abi/src/extern_abi.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ pub enum ExternAbi {
4040
/// Even normally-compatible Rust types can become ABI-incompatible with this ABI!
4141
Unadjusted,
4242

43+
/// An ABI that rustc does not know how to call or define. Functions with this ABI can
44+
/// only be created using `#[naked]` functions or `extern "custom"` blocks, and can only
45+
/// be called from inline assembly.
46+
Custom,
47+
4348
/// UEFI ABI, usually an alias of C, but sometimes an arch-specific alias
4449
/// and only valid on platforms that have a UEFI standard
4550
EfiApi,
@@ -141,6 +146,7 @@ abi_impls! {
141146
AvrNonBlockingInterrupt =><= "avr-non-blocking-interrupt",
142147
Cdecl { unwind: false } =><= "cdecl",
143148
Cdecl { unwind: true } =><= "cdecl-unwind",
149+
Custom =><= "custom",
144150
EfiApi =><= "efiapi",
145151
Fastcall { unwind: false } =><= "fastcall",
146152
Fastcall { unwind: true } =><= "fastcall-unwind",

0 commit comments

Comments
 (0)
Please sign in to comment.