Support muti-module for AOT mode (#2482)

Support muti-module for AOT mode, currently only implement the
multi-module's function import feature for AOT, the memory/table/
global import are not implemented yet.

And update wamr-test-suites scripts, multi-module sample and some
CIs accordingly.
This commit is contained in:
dongsheng28849455
2023-09-28 08:56:11 +08:00
committed by GitHub
parent fff0e2ad1c
commit 79b27c1934
20 changed files with 1018 additions and 343 deletions

View File

@ -1299,6 +1299,16 @@ if __name__ == "__main__":
# add new_module copied from the old into temp_file_repo[]
temp_file_repo.append(new_module)
if test_aot:
new_module_aot = os.path.join(tempfile.gettempdir(), name_new + ".aot")
r = compile_wasm_to_aot(new_module, new_module_aot, True, opts, r)
try:
assert_prompt(r, ['Compile success'], opts.start_timeout, True)
except:
raise Exception("compile wasm to aot failed")
# add aot module into temp_file_repo[]
temp_file_repo.append(new_module_aot)
else:
# there is no name defined in register cmd
raise Exception("can not find module name from the register")
@ -1341,3 +1351,4 @@ if __name__ == "__main__":
log("Leaving tempfiles: %s" % ([wast_tempfile, wasm_tempfile]))
sys.exit(ret_code)