From b0fe01397b4a7fc220c94a797ce747917b3418ba Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Thu, 26 Sep 2019 13:10:41 -0500 Subject: [PATCH] Use HOST call convension in Func signature (#383) --- wasmtime-api/src/types.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wasmtime-api/src/types.rs b/wasmtime-api/src/types.rs index 93b13e80d8..972521342d 100644 --- a/wasmtime-api/src/types.rs +++ b/wasmtime-api/src/types.rs @@ -137,10 +137,11 @@ pub struct FuncType { impl FuncType { pub fn new(params: Box<[ValType]>, results: Box<[ValType]>) -> FuncType { - let signature: ir::Signature = { - use cranelift_codegen::ir::*; - use cranelift_codegen::isa::CallConv; - + use cranelift_codegen::ir::*; + use cranelift_codegen::isa::CallConv; + use target_lexicon::HOST; + let call_conv = CallConv::triple_default(&HOST); + let signature: Signature = { let mut params = params .iter() .map(|p| AbiParam::new(p.get_cranelift_type())) @@ -154,7 +155,7 @@ impl FuncType { Signature { params, returns, - call_conv: CallConv::SystemV, + call_conv, } }; FuncType {