Skip to content

Commit

Permalink
Add --disable-parallel-compilation CLI flag (#4911)
Browse files Browse the repository at this point in the history
  • Loading branch information
TerrorJack authored Sep 16, 2022
1 parent cbd2efd commit f558095
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/cli-flags/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ default = [
"wasmtime/cranelift",
"wasmtime/jitdump",
"wasmtime/vtune",
"wasmtime/parallel-compilation",
]
pooling-allocator = []
memory-init-cow = []
Expand Down
8 changes: 8 additions & 0 deletions crates/cli-flags/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ pub struct CommonOptions {
#[clap(long)]
pub disable_cache: bool,

/// Disable parallel compilation
#[clap(long)]
pub disable_parallel_compilation: bool,

/// Enables or disables WebAssembly features
#[clap(long, value_name = "FEATURE,FEATURE,...", parse(try_from_str = parse_wasm_features))]
pub wasm_features: Option<WasmFeatures>,
Expand Down Expand Up @@ -292,6 +296,10 @@ impl CommonOptions {
}
}

if self.disable_parallel_compilation {
config.parallel_compilation(false);
}

if let Some(max) = self.static_memory_maximum_size {
config.static_memory_maximum_size(max);
}
Expand Down

0 comments on commit f558095

Please sign in to comment.