revert changes to emscripten

This commit is contained in:
Mackenzie Clark
2019-03-28 11:55:01 -07:00
parent c684ea46f0
commit 09642c92db
17 changed files with 653 additions and 1736 deletions

View File

@ -68,31 +68,10 @@ macro_rules! assert_emscripten_output {
}
pub fn assert_emscripten_output(wasm_bytes: &[u8], raw_expected_str: &str) {
use wasmer_clif_backend::CraneliftCompiler;
use wasmer_emscripten::{generate_emscripten_env, stdio::StdioCapturer, EmscriptenGlobals};
use wasmer_runtime_core::backend::Compiler;
#[cfg(feature = "clif")]
fn get_compiler() -> impl Compiler {
use wasmer_clif_backend::CraneliftCompiler;
CraneliftCompiler::new()
}
#[cfg(feature = "llvm")]
fn get_compiler() -> impl Compiler {
use wasmer_llvm_backend::LLVMCompiler;
LLVMCompiler::new()
}
#[cfg(not(any(feature = "llvm", feature = "clif")))]
fn get_compiler() -> impl Compiler {
panic!("compiler not specified, activate a compiler via features");
use wasmer_clif_backend::CraneliftCompiler;
CraneliftCompiler::new()
}
let compiler = get_compiler();
let module = wasmer_runtime_core::compile_with(&wasm_bytes[..], &compiler)
let module = wasmer_runtime_core::compile_with(&wasm_bytes[..], &CraneliftCompiler::new())
.expect("WASM can't be compiled");
let mut emscripten_globals = EmscriptenGlobals::new(&module);

View File

@ -176,8 +176,6 @@ mod test_unary_literal;
mod test_utf;
mod test_varargs;
mod test_varargs_multi;
#[cfg(all(feature = "vfs", not(target_os = "windows")))]
mod test_vfs;
mod test_vprintf;
mod test_vsnprintf;
mod test_wprintf;