diff --git a/Cargo.toml b/Cargo.toml index 260bc4ed8797..536dd2485fee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/src/obj.rs b/src/obj.rs index 529d1c3c6d47..c4b92301dec7 100644 --- a/src/obj.rs +++ b/src/obj.rs @@ -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) }