Move all trampoline compilation to wasmtime-cranelift (#3176)
* Move all trampoline compilation to `wasmtime-cranelift` This commit moves compilation of all the trampolines used in wasmtime behind the `Compiler` trait object to live in `wasmtime-cranelift`. The long-term goal of this is to enable depending on cranelift *only* from the `wasmtime-cranelift` crate, so by moving these dependencies we should make that a little more flexible. * Fix windows build
This commit is contained in:
@@ -132,6 +132,11 @@ impl Compiler {
|
||||
&self.features
|
||||
}
|
||||
|
||||
/// Return the underlying compiler in use
|
||||
pub fn compiler(&self) -> &dyn EnvCompiler {
|
||||
&*self.compiler
|
||||
}
|
||||
|
||||
/// Compile the given function bodies.
|
||||
pub fn compile<'data>(
|
||||
&self,
|
||||
@@ -166,8 +171,7 @@ impl Compiler {
|
||||
vec![]
|
||||
};
|
||||
|
||||
let (obj, unwind_info) =
|
||||
build_object(&*self.isa, &translation, types, &funcs, dwarf_sections)?;
|
||||
let (obj, unwind_info) = build_object(self, &translation, types, &funcs, dwarf_sections)?;
|
||||
|
||||
Ok(Compilation {
|
||||
obj,
|
||||
|
||||
Reference in New Issue
Block a user