Allow missing imports in wasm loader and report error in wasm instantiation instead (#3539)

The wasm loader is failing when multi-module support is on and the dependent
modules are not found; this enforces the AOT compiler integrations to prepare
dependent modules while it isn't necessary.

This PR allows allows missing imports in wasm loader and report error in wasm
instantiation instead, which enables the integrated AOT compiler to work as if
the multi-module support isn't turned on.
This commit is contained in:
Xenia Lu
2024-06-25 10:04:39 +08:00
committed by GitHub
parent 54b87cb097
commit f7d2826772
9 changed files with 241 additions and 183 deletions

View File

@ -1267,6 +1267,9 @@ wasm_runtime_is_built_in_module(const char *module_name)
|| !strcmp("wasi_snapshot_preview1", module_name)
#if WASM_ENABLE_SPEC_TEST != 0
|| !strcmp("spectest", module_name)
#endif
#if WASM_ENABLE_WASI_TEST != 0
|| !strcmp("foo", module_name)
#endif
|| !strcmp("", module_name));
}