-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASI: enable uvwasi debug logging in debug mode #310
Conversation
third_party/uvwasi/CMakeLists.txt
Outdated
@@ -42,6 +42,10 @@ 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_defines UVWASI_DEBUG_LOG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does debug log contain -O0 and -g ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked; it does not, uvwasi only had them enabled when coverage reporting is enabled. Updated the patch so they are also enabled when walrus is in debug mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about using USWASI_DEBUG_LOG
option defined in CMakeList.txt instead?
b74ec7c
to
6865dd3
Compare
third_party/uvwasi/CMakeLists.txt
Outdated
@@ -42,6 +42,12 @@ 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_defines UVWASI_DEBUG_LOG) | |||
add_compile_options( -O0 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need two steps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it did not occur to me that it can take multiple options at the same time.
6865dd3
to
12c7161
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Are you sure we want full wasi debug logging all the time in walrus debug builds though? for example:
would just having |
third_party/uvwasi/CMakeLists.txt
Outdated
@@ -42,6 +42,10 @@ 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_defines UVWASI_DEBUG_LOG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about using USWASI_DEBUG_LOG
option defined in CMakeList.txt instead?
Add option to enable wasi debug logging with `-DUVWASI_DEBUG_LOG=ON` Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
12c7161
to
35b5689
Compare
Updated the patch to only enable uvwasi debug logging when |
No description provided.