Skip to content

Commit dcc4874

Browse files
committed
add extern "custom" functions
1 parent d5e9833 commit dcc4874

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/abi/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ pub(crate) fn conv_to_call_conv(
5151
CanonAbi::Rust | CanonAbi::C => default_call_conv,
5252
CanonAbi::RustCold => CallConv::Cold,
5353

54+
// Functions with this calling convention can only be called from assembly, but it is
55+
// possible to declare an `extern "custom"` block, so the backend still needs a calling
56+
// convention for declaring foreign functions.
57+
CanonAbi::Custom => default_call_conv,
58+
5459
CanonAbi::X86(x86_call) => match x86_call {
5560
X86Call::SysV64 => CallConv::SystemV,
5661
X86Call::Win64 => CallConv::WindowsFastcall,

0 commit comments

Comments
 (0)