Support more features for rt-thread (#3661)
1, enable thread mgr 2, enable libc wasi 3, enable libc wasi threads 4, specify a function name of the module to run rather main
This commit is contained in:
committed by
GitHub
parent
4dfdbbb5a5
commit
6e727dc18d
@ -31,9 +31,11 @@ if GetDepend(['WAMR_BUILD_LIBC_BUILTIN']):
|
||||
|
||||
if GetDepend(['WAMR_BUILD_LIBC_WASI']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-wasi', 'SConscript'))
|
||||
objs += SConscript(os.path.join(SHARED_DIR, 'platform', 'common', 'posix', 'SConscript'))
|
||||
objs += SConscript(os.path.join(SHARED_DIR, 'platform', 'common', 'libc-util', 'SConscript'))
|
||||
|
||||
if GetDepend(['WAMR_BUILD_LIB_PTHREAD']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-pthread', 'SConscript'))
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'lib-pthread', 'SConscript'))
|
||||
|
||||
if GetDepend(['WAMR_BUILD_THREAD_MGR']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'thread-mgr', 'SConscript'))
|
||||
@ -41,6 +43,9 @@ if GetDepend(['WAMR_BUILD_THREAD_MGR']):
|
||||
if GetDepend(['WAMR_BUILD_LIBC_EMCC']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-emmc', 'SConscript'))
|
||||
|
||||
if GetDepend(['WAMR_BUILD_LIB_WASI_THREADS']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'lib-wasi-threads', 'SConscript'))
|
||||
|
||||
objs += SConscript(os.path.join(cwd, 'SConscript_config'));
|
||||
|
||||
objs += SConscript(os.path.join(SHARED_DIR, 'platform', 'rt-thread', 'SConscript'))
|
||||
|
||||
@ -109,7 +109,27 @@ if GetDepend(['WAMR_BUILD_CUSTOM_NAME_SECTION']):
|
||||
|
||||
if GetDepend(['WAMR_BUILD_TAIL_CALL']):
|
||||
CPPDEFINES += ['WASM_ENABLE_TAIL_CALL=1']
|
||||
print('[WAMR] Tail call enabledd')
|
||||
print('[WAMR] Tail call enabled')
|
||||
|
||||
if GetDepend(['WAMR_BUILD_THREAD_MGR']):
|
||||
CPPDEFINES += ['WASM_ENABLE_THREAD_MGR=1']
|
||||
print('[WAMR] Thread manager enabled')
|
||||
|
||||
if GetDepend(['WAMR_BUILD_LIBC_WASI']):
|
||||
CPPDEFINES += ['WASM_ENABLE_LIBC_WASI=1']
|
||||
CPPDEFINES += ['WASM_ENABLE_MODULE_INST_CONTEXT=1']
|
||||
print('[WAMR] Libc wasi enabled')
|
||||
|
||||
if GetDepend(['WAMR_BUILD_LIB_WASI_THREADS']):
|
||||
CPPDEFINES += ['WASM_ENABLE_LIB_WASI_THREADS=1']
|
||||
print('[WAMR] Lib wasi threads enabled')
|
||||
|
||||
if GetDepend(['WAMR_BUILD_REF_TYPES']):
|
||||
CPPDEFINES += ['WASM_ENABLE_REF_TYPES=1']
|
||||
print('[WAMR] enable ref types')
|
||||
|
||||
CPPDEFINES += ['BH_MALLOC=wasm_runtime_malloc']
|
||||
CPPDEFINES += ['BH_FREE=wasm_runtime_free']
|
||||
|
||||
LIBS = ['m']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user