Add ia32 support and fix compiling issue for RT-Thread (#730)
This commit is contained in:
@ -11,23 +11,16 @@ cwd = GetCurrentDir()
|
||||
objs = []
|
||||
|
||||
WAMR_ROOT_DIR = os.path.join(cwd, "..")
|
||||
|
||||
|
||||
SHARED_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'shared')
|
||||
|
||||
IWASM_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'iwasm')
|
||||
|
||||
APP_MGR_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'app-mgr')
|
||||
|
||||
SHARED_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'shared')
|
||||
IWASM_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'iwasm')
|
||||
APP_MGR_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'app-mgr')
|
||||
APP_FRAMEWORK_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'app-framework')
|
||||
|
||||
DEPS_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'deps')
|
||||
DEPS_DIR = os.path.join(WAMR_ROOT_DIR, 'core', 'deps')
|
||||
|
||||
if GetDepend(['WAMR_BUILD_INTERP']):
|
||||
script_path = os.path.join(IWASM_DIR, 'interpreter', 'SConscript')
|
||||
objs += SConscript(script_path)
|
||||
|
||||
|
||||
if GetDepend(['WAMR_BUILD_AOT']):
|
||||
script_path = os.path.join(IWASM_DIR, 'aot', 'SConscript')
|
||||
objs += SConscript(script_path)
|
||||
@ -35,54 +28,32 @@ if GetDepend(['WAMR_BUILD_AOT']):
|
||||
script_path = os.path.join(IWASM_DIR, 'compilation', 'SConscript')
|
||||
objs += SConscript(script_path)
|
||||
|
||||
|
||||
if GetDepend(['WAMR_BUILD_APP_FRAMEWORK']):
|
||||
objs += SConscript(os.path.join(APP_FRAMEWORK_DIR, 'SConscript'))
|
||||
objs += SConscript(os.path.join(SHARED_DIR, 'coap', 'SConscript'))
|
||||
objs += SConscript(os.path.join(APP_MGR_DIR, 'app-manager', 'SConscript'))
|
||||
objs += SConscript(os.path.join(APP_MGR_DIR, 'app-mgr-shared', 'SConscript'))
|
||||
|
||||
|
||||
|
||||
if GetDepend(['WAMR_BUILD_LIBC_BUILTIN']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-builtin', 'SConscript'))
|
||||
|
||||
|
||||
|
||||
if GetDepend(['WAMR_BUILD_LIBC_WASI']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-wasi', 'SConscript'))
|
||||
|
||||
|
||||
if GetDepend(['WAMR_BUILD_LIB_PTHREAD']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-pthread', 'SConscript'))
|
||||
# TODO: 这里加一下
|
||||
|
||||
|
||||
|
||||
# if (WAMR_BUILD_THREAD_MGR EQUAL 1)
|
||||
# include (${IWASM_DIR}/libraries/thread-mgr/thread_mgr.cmake)
|
||||
# endif ()
|
||||
|
||||
if GetDepend(['WAMR_BUILD_THREAD_MGR']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'thread-mgr', 'SConscript'))
|
||||
|
||||
|
||||
|
||||
# if (WAMR_BUILD_LIBC_EMCC EQUAL 1)
|
||||
# include (${IWASM_DIR}/libraries/libc-emcc/libc_emcc.cmake)
|
||||
# endif()
|
||||
|
||||
if GetDepend(['WAMR_BUILD_LIBC_EMCC']):
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'libraries', 'libc-emmc', 'SConscript'))
|
||||
|
||||
objs += SConscript(os.path.join(cwd, 'SConscript_config'));
|
||||
|
||||
|
||||
objs += SConscript(os.path.join(SHARED_DIR, 'platform', 'rt-thread', 'SConscript'))
|
||||
objs += SConscript(os.path.join(SHARED_DIR, 'mem-alloc', 'SConscript'))
|
||||
objs += SConscript(os.path.join(IWASM_DIR, 'common', 'SConscript'))
|
||||
objs += SConscript(os.path.join(SHARED_DIR, 'utils', 'SConscript'))
|
||||
|
||||
|
||||
|
||||
Return('objs')
|
||||
|
||||
@ -11,15 +11,12 @@ from building import *
|
||||
|
||||
Import('rtconfig')
|
||||
|
||||
src = Split('''
|
||||
''')
|
||||
src = []
|
||||
objs = []
|
||||
cwd = GetCurrentDir()
|
||||
|
||||
IWASM_INC_DIR = os.path.join(cwd, '..', 'core', 'iwasm', 'include')
|
||||
|
||||
# include_directories (${IWASM_DIR}/include)
|
||||
|
||||
CPPPATH = [IWASM_INC_DIR]
|
||||
|
||||
if rtconfig.BUILD == 'debug':
|
||||
@ -48,12 +45,11 @@ if rtconfig.ARCH == 'arm':
|
||||
print('[WAMR] using armv4')
|
||||
CPPDEFINES += ['BUILD_TARGET_ARM']
|
||||
CPPDEFINES += ['RTT_WAMR_BUILD_TARGET_ARMV4']
|
||||
elif rtconfig.ARCH == 'ia32':
|
||||
CPPDEFINES += ['BUILD_TARGET_X86_32', 'RTT_WAMR_BUILD_TARGET_X86_32']
|
||||
else:
|
||||
print("[WAMR] unknown arch", rtconfig.ARCH)
|
||||
|
||||
|
||||
LIBS = ['m']
|
||||
|
||||
if GetDepend(['WAMR_BUILD_INTERP']):
|
||||
CPPDEFINES += ['WASM_ENABLE_INTERP=1']
|
||||
if GetDepend(['WAMR_BUILD_FAST_INTERP']):
|
||||
@ -114,8 +110,8 @@ if GetDepend(['WAMR_BUILD_TAIL_CALL']):
|
||||
CPPDEFINES += ['WASM_ENABLE_TAIL_CALL=1']
|
||||
print('[WAMR] Tail call enabledd')
|
||||
|
||||
LIBS = ['m']
|
||||
|
||||
group = DefineGroup('wamr_config_common', src, depend = ['PKG_USING_WAMR'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
|
||||
group = DefineGroup('wamr', src, depend = ['PKG_USING_WAMR'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
|
||||
|
||||
Return('group')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user