Skip to content

Commit

Permalink
WASI: Enable debug build if walrus is a debug build
Browse files Browse the repository at this point in the history
Add option to enable wasi debug logging with `-DUVWASI_DEBUG_LOG=ON`

Signed-off-by: Máté Tokodi [email protected]
  • Loading branch information
matetokodi authored and clover2123 committed Dec 9, 2024
1 parent ed31dc5 commit 866c995
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions third_party/uvwasi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND uvwasi_defines _GNU_SOURCE _POSIX_C_SOURCE=200112)
endif()

if (WALRUS_MODE STREQUAL "debug")
list(APPEND uvwasi_cflags -O0 -g)

if (UVWASI_DEBUG_LOG)
list(APPEND uvwasi_defines UVWASI_DEBUG_LOG)
endif ()
endif ()

#find_package(LIBUV QUIET)
#if(LIBUV_FOUND)
# include_directories(${LIBUV_INCLUDE_DIR})
Expand Down

0 comments on commit 866c995

Please sign in to comment.