Эх сурвалжийг харах

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.
Benbuck Nason 1 жил өмнө
parent
commit
421a6c4301

+ 5 - 0
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()