Add dynasm feature to emscripten tests

This commit is contained in:
Brandon Fish
2019-03-13 20:16:07 -05:00
parent d4ded2cf07
commit e5d67c9705
4 changed files with 18 additions and 3 deletions

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;