Refactor clock functions to use WASI types (#2666)
Refactoring the clock functions to use WASI types so we can simplify the code and remove some unnecessary boilerplate. See https://github.com/bytecodealliance/wasm-micro-runtime/pull/2637#discussion_r1362202879 for details.
This commit is contained in:
@ -29,15 +29,16 @@ file (GLOB source_all ${PLATFORM_SHARED_DIR}/*.c)
|
||||
if (NOT WAMR_BUILD_LIBC_WASI EQUAL 1)
|
||||
add_definitions(-DSGX_DISABLE_WASI)
|
||||
else()
|
||||
list(APPEND source_all ${PLATFORM_SHARED_DIR}/../common/posix/posix_file.c)
|
||||
list(APPEND source_all
|
||||
${PLATFORM_SHARED_DIR}/../common/posix/posix_file.c
|
||||
${PLATFORM_SHARED_DIR}/../common/posix/posix_clock.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()
|
||||
|
||||
file (GLOB source_all_untrusted ${PLATFORM_SHARED_DIR}/untrusted/*.c)
|
||||
|
||||
list(APPEND source_all ${PLATFORM_SHARED_DIR}/../common/posix/posix_clock.c)
|
||||
|
||||
set (PLATFORM_SHARED_SOURCE ${source_all})
|
||||
|
||||
set (PLATFORM_SHARED_SOURCE_UNTRUSTED ${source_all_untrusted})
|
||||
|
||||
Reference in New Issue
Block a user