Răsfoiți Sursa

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.
Benbuck Nason 1 an în urmă
părinte
comite
5d1f19fc09
1 a modificat fișierele cu 10 adăugiri și 3 ștergeri
  1. 10 3
      core/iwasm/interpreter/wasm_mini_loader.c

+ 10 - 3
core/iwasm/interpreter/wasm_mini_loader.c

@@ -2114,7 +2114,7 @@ static bool
 init_llvm_jit_functions_stage1(WASMModule *module, char *error_buf,
                                uint32 error_buf_size)
 {
-    LLVMJITOptions llvm_jit_options = wasm_runtime_get_llvm_jit_options();
+    LLVMJITOptions *llvm_jit_options = wasm_runtime_get_llvm_jit_options();
     AOTCompOption option = { 0 };
     char *aot_last_error;
     uint64 size;
@@ -3235,8 +3235,11 @@ load(const uint8 *buf, uint32 size, WASMModule *module,
 }
 
 WASMModule *
-wasm_loader_load(uint8 *buf, uint32 size, const LoadArgs *args, char *error_buf,
-                 uint32 error_buf_size)
+wasm_loader_load(uint8 *buf, uint32 size,
+#if WASM_ENABLE_MULTI_MODULE != 0
+                 bool main_module,
+#endif
+                 const LoadArgs *args, char *error_buf, uint32 error_buf_size)
 {
     WASMModule *module = create_module(args->name, error_buf, error_buf_size);
     if (!module) {
@@ -3254,6 +3257,10 @@ wasm_loader_load(uint8 *buf, uint32 size, const LoadArgs *args, char *error_buf,
         goto fail;
     }
 
+#if WASM_ENABLE_MULTI_MODULE != 0
+    (void)main_module;
+#endif
+
     LOG_VERBOSE("Load module success.\n");
     return module;