From bca4ed4fee756307ca9d581c55f55452817d6771 Mon Sep 17 00:00:00 2001 From: Daniel Mangum Date: Thu, 25 Jan 2024 09:10:38 -0500 Subject: [PATCH] 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 --- core/shared/platform/zephyr/shared_platform.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/shared/platform/zephyr/shared_platform.cmake b/core/shared/platform/zephyr/shared_platform.cmake index 9b043b52f..7a512672e 100644 --- a/core/shared/platform/zephyr/shared_platform.cmake +++ b/core/shared/platform/zephyr/shared_platform.cmake @@ -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})