diff --git a/build.zig b/build.zig index e6e4bda1..2a8d56a4 100644 --- a/build.zig +++ b/build.zig @@ -1,5 +1,3 @@ -//! Note: This file is just for 0.11 zig! -//! For 0.12 and later, please see zig-webui! const std = @import("std"); const builtin = @import("builtin"); @@ -69,8 +67,7 @@ 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(std.heap.page_allocator); - defer civetweb_flags.deinit(); + 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(if (enable_tls) tls_flags else &[_][]const u8{ "-DUSE_WEBSOCKET", "-DNO_SSL" }); if (is_windows) try civetweb_flags.append("-DMUST_IMPLEMENT_CLOCK_GETTIME");