Skip to content

Commit

Permalink
scm: Print webui logs in debug mode (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
mochalins authored Nov 19, 2024
1 parent 5a710c2 commit a44283b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ fn addLinkerFlags(
) !void {
const webui_target = webui.rootModuleTarget();
const is_windows = webui_target.os.tag == .windows;

const debug = webui.root_module.optimize.? == .Debug;

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

if (debug) {
webui.root_module.addCMacro("WEBUI_LOG", "");
}
webui.addCSourceFile(.{
.file = b.path("src/webui.c"),
.flags = if (enable_tls) tls_flags else no_tls_flags,
Expand Down

0 comments on commit a44283b

Please sign in to comment.