Skip to content

Commit 5d1f19f

Browse files
authored
Fix wasm_mini_loader.c build when jit or multi-module is enabled (#3502)
This PR fixes compilation error when building with `-DWAMR_BUILD_MINI_LOADER=1 -DWAMR_BUILD_JIT=1` or `-DWAMR_BUILD_MINI_LOADER=1 -DWAMR_BUILD_MULTI_MODULE=1`, though normally we don't use wasm mini loader when JIT or multi-module is enabled.
1 parent 421a6c4 commit 5d1f19f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

core/iwasm/interpreter/wasm_mini_loader.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ static bool
21142114
init_llvm_jit_functions_stage1(WASMModule *module, char *error_buf,
21152115
uint32 error_buf_size)
21162116
{
2117-
LLVMJITOptions llvm_jit_options = wasm_runtime_get_llvm_jit_options();
2117+
LLVMJITOptions *llvm_jit_options = wasm_runtime_get_llvm_jit_options();
21182118
AOTCompOption option = { 0 };
21192119
char *aot_last_error;
21202120
uint64 size;
@@ -3235,8 +3235,11 @@ load(const uint8 *buf, uint32 size, WASMModule *module,
32353235
}
32363236

32373237
WASMModule *
3238-
wasm_loader_load(uint8 *buf, uint32 size, const LoadArgs *args, char *error_buf,
3239-
uint32 error_buf_size)
3238+
wasm_loader_load(uint8 *buf, uint32 size,
3239+
#if WASM_ENABLE_MULTI_MODULE != 0
3240+
bool main_module,
3241+
#endif
3242+
const LoadArgs *args, char *error_buf, uint32 error_buf_size)
32403243
{
32413244
WASMModule *module = create_module(args->name, error_buf, error_buf_size);
32423245
if (!module) {
@@ -3254,6 +3257,10 @@ wasm_loader_load(uint8 *buf, uint32 size, const LoadArgs *args, char *error_buf,
32543257
goto fail;
32553258
}
32563259

3260+
#if WASM_ENABLE_MULTI_MODULE != 0
3261+
(void)main_module;
3262+
#endif
3263+
32573264
LOG_VERBOSE("Load module success.\n");
32583265
return module;
32593266

0 commit comments

Comments
 (0)