Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions core/iwasm/aot/aot_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -2957,7 +2957,7 @@ aot_load_from_comp_data(AOTCompData *comp_data, AOTCompContext *comp_ctx,
if (size > 0
&& !(module->func_type_indexes =
loader_malloc(size, error_buf, error_buf_size))) {
goto fail3;
goto fail4;
}
for (i = 0; i < comp_data->func_count; i++)
module->func_type_indexes[i] = comp_data->funcs[i]->func_type_index;
Expand Down Expand Up @@ -2987,7 +2987,7 @@ aot_load_from_comp_data(AOTCompData *comp_data, AOTCompContext *comp_ctx,
"failed to compile orc jit function: %s",
err_msg);
LLVMDisposeErrorMessage(err_msg);
goto fail4;
goto fail5;
}
module->func_ptrs[comp_data->start_func_index
- module->import_func_count] =
Expand Down Expand Up @@ -3028,16 +3028,17 @@ aot_load_from_comp_data(AOTCompData *comp_data, AOTCompContext *comp_ctx,
return module;

#if WASM_ENABLE_LAZY_JIT != 0
fail4:
fail5:
if (module->func_type_indexes)
wasm_runtime_free(module->func_type_indexes);
#endif

fail3:
fail4:
#if WASM_ENABLE_LAZY_JIT != 0
/* Terminate all threads before free module->func_ptrs */
orcjit_stop_compile_threads();
#endif
fail3:
if (module->func_ptrs)
wasm_runtime_free(module->func_ptrs);
fail2:
Expand Down
2 changes: 1 addition & 1 deletion core/iwasm/common/wasm_runtime_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ wasm_runtime_finalize_call_function(WASMExecEnv *exec_env,
uint32 argv_i = 0, result_i = 0, ret_argv_i = 0;
WASMType *func_type;

bh_assert(argv && ret_argv);
bh_assert((argv && ret_argv) || (argc == 0));

if (argv == ret_argv) {
return true;
Expand Down
2 changes: 2 additions & 0 deletions core/iwasm/compilation/aot_llvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,9 @@ aot_create_comp_context(AOTCompData *comp_data, aot_comp_option_t option)
goto fail;
}

#if WASM_ENABLE_LAZY_JIT == 0
LLVMSetTarget(comp_ctx->module, triple_norm);
#endif
}

if (option->enable_simd && strcmp(comp_ctx->target_arch, "x86_64") != 0
Expand Down
2 changes: 1 addition & 1 deletion product-mini/platforms/android/build_jit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
rm -fr build && mkdir build
cd build
cmake .. -DWAMR_BUILD_JIT=1
make
make -j ${nroc}
cd ..
2 changes: 1 addition & 1 deletion product-mini/platforms/darwin/build_jit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
rm -fr build && mkdir build
cd build
cmake .. -DWAMR_BUILD_JIT=1
make
make -j ${nproc}
cd ..
2 changes: 1 addition & 1 deletion product-mini/platforms/linux/build_jit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ cd build
# By default LazyJIT is enabled, to disable it:
# cmake .. -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0
cmake .. -DWAMR_BUILD_JIT=1
make
make -j ${nproc}
cd ..