Skip to content

Commit

Permalink
Adjust obj.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
pepyakin committed Aug 9, 2021
1 parent 0bfdae1 commit d66ebee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ members = [
exclude = ['crates/wasi-common/WASI/tools/witx-cli']

[features]
default = ["jitdump", "wasmtime/wat", "wasmtime/parallel-compilation", "wasi-nn"]
default = ["jitdump", "wasmtime/wat", "parallel-compilation", "wasi-nn"]
parallel-compilation = ["wasmtime/parallel-compilation"]
lightbeam = ["wasmtime/lightbeam"]
jitdump = ["wasmtime/jitdump"]
vtune = ["wasmtime/vtune"]
Expand Down
7 changes: 6 additions & 1 deletion src/obj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ pub fn compile_to_obj(
.translate(wasm)
.context("failed to translate module")?;
assert_eq!(translation.len(), 1);
let compilation = compiler.compile(&mut translation[0], &types)?;
let compilation = compiler.compile(
&mut translation[0],
&types,
#[cfg(feature = "parallel-compilation")]
true,
)?;
Ok(compilation.obj)
}

0 comments on commit d66ebee

Please sign in to comment.