mirror of
				https://github.com/bytecodealliance/wasm-micro-runtime.git
				synced 2025-10-31 13:17:31 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									421a6c4301
								
							
						
					
					
						commit
						5d1f19fc09
					
				|  | @ -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; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Benbuck Nason
						Benbuck Nason