fix(wasmtime):Config methods should be idempotent (#4252)
This commit refactored `Config` to use a seperate `CompilerConfig` field instead of operating on `CompilerBuilder` directly to make all its methods idempotent. Fixes #4189
This commit is contained in:
@@ -21,7 +21,7 @@ fn store_with_padding(padding: usize) -> Result<Store<()>> {
|
||||
config.cranelift_flag_set(
|
||||
"wasmtime_linkopt_padding_between_functions",
|
||||
&padding.to_string(),
|
||||
)?;
|
||||
);
|
||||
}
|
||||
let engine = Engine::new(&config)?;
|
||||
Ok(Store::new(&engine, ()))
|
||||
@@ -78,7 +78,7 @@ fn mixed() -> Result<()> {
|
||||
fn mixed_forced() -> Result<()> {
|
||||
let mut config = Config::new();
|
||||
unsafe {
|
||||
config.cranelift_flag_set("wasmtime_linkopt_force_jump_veneer", "true")?;
|
||||
config.cranelift_flag_set("wasmtime_linkopt_force_jump_veneer", "true");
|
||||
}
|
||||
let engine = Engine::new(&config)?;
|
||||
test_many_call_module(Store::new(&engine, ()))
|
||||
|
||||
Reference in New Issue
Block a user