Merge remote-tracking branch 'private/feature/dynasm-backend' into feature/dynasm-backend

This commit is contained in:
losfair 2019-03-14 10:31:48 +08:00
commit c76887d83c
4 changed files with 18 additions and 3 deletions

1
Cargo.lock generated
View File

@ -1387,6 +1387,7 @@ dependencies = [
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-clif-backend 0.2.0",
"wasmer-dynasm-backend 0.1.0",
"wasmer-llvm-backend 0.1.0",
"wasmer-runtime-core 0.2.1",
]

View File

@ -21,6 +21,7 @@ rand = "0.6"
[dev-dependencies]
wasmer-clif-backend = { path = "../clif-backend", version = "0.2.0" }
wabt = "0.7.2"
wasmer-dynasm-backend = { path = "../dynasm-backend", version = "0.1.0" }
[target.'cfg(not(windows))'.dev-dependencies]
wasmer-llvm-backend = { path = "../llvm-backend", version = "0.1.0" }
@ -30,4 +31,5 @@ glob = "0.2.11"
[features]
clif = []
llvm = []
llvm = []
dynasm = []

View File

@ -185,7 +185,13 @@ mod tests {
LLVMCompiler::new()
}
#[cfg(not(any(feature = "llvm", feature = "clif")))]
#[cfg(feature = "dynasm")]
fn get_compiler() -> impl Compiler {
use wasmer_dynasm_backend::SinglePassCompiler;
SinglePassCompiler::new()
}
#[cfg(not(any(feature = "llvm", feature = "clif", feature = "dynasm")))]
fn get_compiler() -> impl Compiler {
panic!("compiler not specified, activate a compiler via features");
use wasmer_clif_backend::CraneliftCompiler;

View File

@ -20,7 +20,13 @@ macro_rules! assert_emscripten_output {
LLVMCompiler::new()
}
#[cfg(not(any(feature = "llvm", feature = "clif")))]
#[cfg(feature = "dynasm")]
fn get_compiler() -> impl Compiler {
use wasmer_dynasm_backend::SinglePassCompiler;
SinglePassCompiler::new()
}
#[cfg(not(any(feature = "llvm", feature = "clif", feature = "dynasm")))]
fn get_compiler() -> impl Compiler {
panic!("compiler not specified, activate a compiler via features");
use wasmer_clif_backend::CraneliftCompiler;