Enable Android libc wasi support. (#590)
Some libc APIs required by wasi native lib are missing in some Android API versions, only when the version >= 24, all APIs are supported. Add the missing APIs in android platform layer, leave them empty, report error and return failed if they are called. Also update CMakeLists.txt to enable libc wasi by default. Co-authored-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
@ -11,6 +11,9 @@ set (ANDROID_NDK $ENV{ANDROID_NDK_HOME})
|
||||
set (ANDROID_SDK $ENV{ANDROID_SDK_HOME})
|
||||
set (ANDROID_ABI "x86")
|
||||
set (ANDROID_LD lld)
|
||||
if (NOT DEFINED ANDROID_PLATFORM)
|
||||
set (ANDROID_PLATFORM 24)
|
||||
endif ()
|
||||
|
||||
project (iwasm)
|
||||
|
||||
@ -20,7 +23,7 @@ set (WAMR_BUILD_TYPE Release)
|
||||
set (WAMR_BUILD_INTERP 1)
|
||||
set (WAMR_BUILD_AOT 0)
|
||||
set (WAMR_BUILD_LIBC_BUILTIN 1)
|
||||
set (WAMR_BUILD_LIBC_WASI 0)
|
||||
set (WAMR_BUILD_LIBC_WASI 1)
|
||||
|
||||
# Reset default linker flags
|
||||
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
|
||||
Reference in New Issue
Block a user