Connect part of the llvm backend to the runtime

This commit is contained in:
Lachlan Sneff
2019-02-28 13:18:00 -08:00
parent d4ae5cdd40
commit 359ac5abec
7 changed files with 77 additions and 24 deletions

View File

@ -154,10 +154,11 @@ pub fn instantiate(wasm: &[u8], import_object: &ImportObject) -> error::Result<I
fn default_compiler() -> &'static dyn Compiler {
use lazy_static::lazy_static;
use wasmer_clif_backend::CraneliftCompiler;
// use wasmer_clif_backend::CraneliftCompiler;
use wasmer_llvm_backend::LLVMCompiler;
lazy_static! {
static ref DEFAULT_COMPILER: CraneliftCompiler = { CraneliftCompiler::new() };
static ref DEFAULT_COMPILER: LLVMCompiler = { LLVMCompiler::new() };
}
&*DEFAULT_COMPILER as &dyn Compiler