From 65f7bac73c774e3e75efc35566b2d9466726ffd2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 25 Feb 2023 11:07:31 -0700 Subject: [PATCH] Revert "[wasm-shape] No need to set default runnint mode" This reverts commit fa484fac08a868e885b3252522668824f0f0fe71. --- src/hb-wasm-shape.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hb-wasm-shape.cc b/src/hb-wasm-shape.cc index 507ca1664..7c486fe51 100644 --- a/src/hb-wasm-shape.cc +++ b/src/hb-wasm-shape.cc @@ -62,6 +62,11 @@ init_wasm () RuntimeInitArgs init_args; memset (&init_args, 0, sizeof (RuntimeInitArgs)); + if (wasm_runtime_is_running_mode_supported (Mode_LLVM_JIT)) + init_args.running_mode = Mode_LLVM_JIT; + else if (wasm_runtime_is_running_mode_supported (Mode_Fast_JIT)) + init_args.running_mode = Mode_Fast_JIT; + init_args.mem_alloc_type = Alloc_With_Allocator; init_args.mem_alloc_option.allocator.malloc_func = (void *) hb_malloc; init_args.mem_alloc_option.allocator.realloc_func = (void *) hb_realloc;