scm: Print webui logs in debug mode (#527)

This commit is contained in:
John 2024-11-19 23:30:30 +09:00 committed by GitHub
parent 5a710c29ce
commit a44283b04d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.
@ -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,