Skip to content

Commit a44283b

Browse files
authored
scm: Print webui logs in debug mode (#527)
1 parent 5a710c2 commit a44283b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ fn addLinkerFlags(
7373
) !void {
7474
const webui_target = webui.rootModuleTarget();
7575
const is_windows = webui_target.os.tag == .windows;
76-
7776
const debug = webui.root_module.optimize.? == .Debug;
7877

7978
// Prepare compiler flags.
@@ -86,6 +85,9 @@ fn addLinkerFlags(
8685
"-Wno-error=date-time",
8786
};
8887

88+
if (debug) {
89+
webui.root_module.addCMacro("WEBUI_LOG", "");
90+
}
8991
webui.addCSourceFile(.{
9092
.file = b.path("src/webui.c"),
9193
.flags = if (enable_tls) tls_flags else no_tls_flags,

0 commit comments

Comments
 (0)