Skip to content

Commit

Permalink
fix: Release mode building with Zig
Browse files Browse the repository at this point in the history
  • Loading branch information
mochalins authored and jinzhongjia committed Oct 11, 2024
1 parent cf0c54e commit 3b0736f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ fn addLinkerFlags(b: *Build, webui: *Compile, enable_tls: bool) !void {
// Prepare compiler flags.
const tls_flags = &[_][]const u8{ "-DWEBUI_TLS", "-DNO_SSL_DL", "-DOPENSSL_API_1_1" };
var civetweb_flags = std.ArrayList([]const u8).init(b.allocator);
try civetweb_flags.appendSlice(&[_][]const u8{ "-DNDEBUG", "-DNO_CACHING", "-DNO_CGI", "-DUSE_WEBSOCKET" });
try civetweb_flags.appendSlice(&[_][]const u8{ "-DNDEBUG", "-DNO_CACHING", "-DNO_CGI", "-DUSE_WEBSOCKET", "-Wno-error=date-time" });
try civetweb_flags.appendSlice(if (enable_tls) tls_flags else &[_][]const u8{ "-DUSE_WEBSOCKET", "-DNO_SSL" });
if (is_windows) try civetweb_flags.append("-DMUST_IMPLEMENT_CLOCK_GETTIME");

webui.addCSourceFile(.{
.file = if (zig_ver < 12) .{ .path = "src/webui.c" } else b.path("src/webui.c"),
Expand Down

0 comments on commit 3b0736f

Please sign in to comment.