Browse Source

Merge pull request #988 from peterhuene/default-opt-level

Change default opt-level for Config to `speed`.
pull/999/head
Peter Huene 5 years ago
committed by GitHub
parent
commit
0c23c2e5e0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      crates/api/src/runtime.rs
  2. 8
      tests/wast_testsuites.rs

5
crates/api/src/runtime.rs

@ -46,6 +46,11 @@ impl Config {
.set("enable_verifier", "false")
.expect("should be valid flag");
// Turn on cranelift speed optimizations by default
flags
.set("opt_level", "speed")
.expect("should be valid flag");
Config {
debug_info: false,
validating_config: ValidatingParserConfig {

8
tests/wast_testsuites.rs

@ -1,5 +1,5 @@
use std::path::Path;
use wasmtime::{Config, Engine, Store, Strategy};
use wasmtime::{Config, Engine, OptLevel, Store, Strategy};
use wasmtime_wast::WastContext;
include!(concat!(env!("OUT_DIR"), "/wast_testsuite_tests.rs"));
@ -24,6 +24,12 @@ fn run_wast(wast: &str, strategy: Strategy) -> anyhow::Result<()> {
.wasm_multi_value(multi_val)
.strategy(strategy)?
.cranelift_debug_verifier(true);
// FIXME: https://github.com/bytecodealliance/cranelift/issues/1409
if simd {
cfg.cranelift_opt_level(OptLevel::None);
}
let store = Store::new(&Engine::new(&cfg));
let mut wast_context = WastContext::new(store);
wast_context.register_spectest()?;

Loading…
Cancel
Save