From e1b9c01d94485fa63d90920a10f49a3e9499f863 Mon Sep 17 00:00:00 2001 From: Jean-Bapiste Lepesme Date: Sun, 29 Sep 2019 19:37:33 +0200 Subject: [PATCH] Fix opt_level setting passed to cranelift With https://github.com/CraneStation/cranelift/commit/92a19e9398a0413ac598537c3dbea3a3699f45a1 the optimisation levels of cranelift were renamed, without this change trying to use the -o flag on wasmtime runtime results in "error: Unexpected value for a setting, expected any among none, speed, speed_and_size". "best" was renamed "speed_and_size", although I think "speed" is more adapted to wastime. Bye, JB. --- src/bin/wasmtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/wasmtime.rs b/src/bin/wasmtime.rs index e16724e9bb..10e362ea95 100644 --- a/src/bin/wasmtime.rs +++ b/src/bin/wasmtime.rs @@ -278,7 +278,7 @@ fn rmain() -> Result<(), Error> { // Enable optimization if requested. if args.flag_optimize { - flag_builder.set("opt_level", "best")?; + flag_builder.set("opt_level", "speed")?; } let config = Config::new(settings::Flags::new(flag_builder), features, debug_info);