diff --git a/crates/cranelift/src/lib.rs b/crates/cranelift/src/lib.rs index a88fbadc032e..41bcad2241fc 100644 --- a/crates/cranelift/src/lib.rs +++ b/crates/cranelift/src/lib.rs @@ -228,6 +228,12 @@ fn wasm_call_signature( Architecture::S390x, "https://github.com/bytecodealliance/wasmtime/issues/6530" ); + + assert!( + !tunables.winch_callable, + "Winch doesn't support the WebAssembly tail call proposal", + ); + CallConv::Tail } diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index 8437647e6c8b..0f55516df4d9 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -1755,11 +1755,16 @@ impl Config { Strategy::Cranelift => false, Strategy::Winch => true, }; + + if tunables.winch_callable && tunables.tail_callable { + bail!("Winch does not support the WebAssembly tail call proposal"); + } } if tunables.static_memory_offset_guard_size < tunables.dynamic_memory_offset_guard_size { bail!("static memory guard size cannot be smaller than dynamic memory guard size"); } + Ok(tunables) }