diff --git a/Cargo.lock b/Cargo.lock index dace6acc72d..f9f5e13d225 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,16 +44,16 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cranelift-bforest" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" dependencies = [ "byteorder", "cranelift-bforest", @@ -69,8 +69,8 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" dependencies = [ "cranelift-codegen-shared", "cranelift-entity", @@ -78,18 +78,18 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" [[package]] name = "cranelift-entity" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" [[package]] name = "cranelift-frontend" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" dependencies = [ "cranelift-codegen", "log", @@ -99,8 +99,8 @@ dependencies = [ [[package]] name = "cranelift-module" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" dependencies = [ "anyhow", "cranelift-codegen", @@ -111,8 +111,8 @@ dependencies = [ [[package]] name = "cranelift-native" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" dependencies = [ "cranelift-codegen", "raw-cpuid", @@ -121,8 +121,8 @@ dependencies = [ [[package]] name = "cranelift-object" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" dependencies = [ "cranelift-codegen", "cranelift-module", @@ -132,8 +132,8 @@ dependencies = [ [[package]] name = "cranelift-simplejit" -version = "0.60.0" -source = "git+https://github.com/bytecodealliance/wasmtime/#0d4bde4ab30f202c888888db7a8eb2d905c0119f" +version = "0.61.0" +source = "git+https://github.com/bytecodealliance/wasmtime/#08e5484cdb158b7795587ff7ad0cb04beef6dcd3" dependencies = [ "cranelift-codegen", "cranelift-module", diff --git a/src/allocator.rs b/src/allocator.rs index b8240f4a822..0b40af9de54 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -94,6 +94,10 @@ fn codegen_inner(module: &mut Module, kind: AllocatorKin bcx.seal_all_blocks(); bcx.finalize(); } - module.define_function(func_id, &mut ctx).unwrap(); + module.define_function( + func_id, + &mut ctx, + &mut cranelift_codegen::binemit::NullTrapSink {}, + ).unwrap(); } } diff --git a/src/backend.rs b/src/backend.rs index 723f1bca55a..3612ec63340 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -125,7 +125,6 @@ pub(crate) fn make_module(sess: &Session, name: String) -> Module { ObjectBuilder::new( crate::build_isa(sess, true), name + ".o", - ObjectTrapCollection::Disabled, cranelift_module::default_libcall_names(), ), ); diff --git a/src/base.rs b/src/base.rs index a9012581638..9709dce697f 100644 --- a/src/base.rs +++ b/src/base.rs @@ -171,7 +171,14 @@ pub(crate) fn trans_fn<'clif, 'tcx, B: Backend + 'static>( // Define function let module = &mut cx.module; - tcx.sess.time("define function", || module.define_function(func_id, context).unwrap()); + tcx.sess.time( + "define function", + || module.define_function( + func_id, + context, + &mut cranelift_codegen::binemit::NullTrapSink {}, + ).unwrap(), + ); // Write optimized function to file for debugging #[cfg(debug_assertions)] diff --git a/src/main_shim.rs b/src/main_shim.rs index 81f9e0ebad9..ab264f2e85a 100644 --- a/src/main_shim.rs +++ b/src/main_shim.rs @@ -103,6 +103,10 @@ pub(crate) fn maybe_create_entry_wrapper(tcx: TyCtxt<'_>, module: &mut Module