Update wasm app build scripts for wasi-sdk-12 and refine interpreter (#481)
Update wasm app build scripts for wasi-sdk-12.0: add --export=__main_argc_argv, remove --no-threads Lookup function with name "__main_argc_argv" as main function besides "main" Change module_malloc to runtime_malloc in wasi native lib Refine classic interpreter op_block and op_br_table Refine faster interpreter op_br_table Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
@ -27,11 +27,13 @@ set (DEFINED_SYMBOLS
|
||||
"${WAMR_ROOT_DIR}/wamr-sdk/app/libc-builtin-sysroot/share/defined-symbols.txt")
|
||||
|
||||
set (CMAKE_EXE_LINKER_FLAGS
|
||||
"-Wl,--shared-memory,--max-memory=131072, \
|
||||
-Wl,--no-entry,--strip-all,--export=main, \
|
||||
-Wl,--export=__heap_base,--export=__data_end \
|
||||
-Wl,--export=__wasm_call_ctors \
|
||||
-Wl,--allow-undefined-file=${DEFINED_SYMBOLS}"
|
||||
"-Wl,--shared-memory,--max-memory=131072, \
|
||||
-Wl,--no-entry,--strip-all, \
|
||||
-Wl,--export=__heap_base,--export=__data_end \
|
||||
-Wl,--export=__wasm_call_ctors \
|
||||
-Wl,--export=main -Wl,--export=__main_argc_argv \
|
||||
-Wl,--allow-undefined"
|
||||
#-Wl,--allow-undefined-file=${DEFINED_SYMBOLS}"
|
||||
)
|
||||
|
||||
add_executable(test.wasm main.c)
|
||||
|
||||
Reference in New Issue
Block a user