zephyr: include libc utils when building with WASI support

Follows up the change in
https://github.com/bytecodealliance/wasm-micro-runtime/pull/2585 to
include libc utils when targeting zephyr, which abstracts posix
filesystem functions.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
This commit is contained in:
Daniel Mangum 2024-01-25 09:10:38 -05:00
parent 6daaf6d27a
commit bca4ed4fee

View File

@ -12,5 +12,11 @@ include (${CMAKE_CURRENT_LIST_DIR}/../common/math/platform_api_math.cmake)
file (GLOB_RECURSE source_all ${PLATFORM_SHARED_DIR}/*.c)
if (WAMR_BUILD_LIBC_WASI EQUAL 1)
list(APPEND source_all ${PLATFORM_SHARED_DIR}/../common/posix/posix_file.c)
include (${CMAKE_CURRENT_LIST_DIR}/../common/libc-util/platform_common_libc_util.cmake)
set(source_all ${source_all} ${PLATFORM_COMMON_LIBC_UTIL_SOURCE})
endif ()
set (PLATFORM_SHARED_SOURCE ${source_all} ${PLATFORM_COMMON_MATH_SOURCE})