From 421a6c430194853948a7e5d264e2e43496175563 Mon Sep 17 00:00:00 2001 From: Benbuck Nason Date: Wed, 5 Jun 2024 18:37:28 -0700 Subject: [PATCH] Fix posix build when libc wasi is disabled and debug interp is enabled (#3503) This change supports building with `-DWAMR_BUILD_LIBC_WASI=0` and `-DWAMR_BUILD_DEBUG_INTERP=1`, otherwise the os_socket_* functions will be undefined. --- core/shared/platform/common/posix/platform_api_posix.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/shared/platform/common/posix/platform_api_posix.cmake b/core/shared/platform/common/posix/platform_api_posix.cmake index 15d6daf3..2553a7d0 100644 --- a/core/shared/platform/common/posix/platform_api_posix.cmake +++ b/core/shared/platform/common/posix/platform_api_posix.cmake @@ -9,6 +9,11 @@ if (NOT WAMR_BUILD_LIBC_WASI EQUAL 1) list(REMOVE_ITEM source_all ${PLATFORM_COMMON_POSIX_DIR}/posix_file.c ${PLATFORM_COMMON_POSIX_DIR}/posix_clock.c + ) +endif() + +if ((NOT WAMR_BUILD_LIBC_WASI EQUAL 1) AND (NOT WAMR_BUILD_DEBUG_INTERP EQUAL 1)) + list(REMOVE_ITEM source_all ${PLATFORM_COMMON_POSIX_DIR}/posix_socket.c ) else()