1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00

fix build.zig: new 0.15.1 stdlib

This commit is contained in:
renerocksai 2025-08-28 19:44:30 +02:00
parent 3c22e9dac5
commit 5c1fa416aa
No known key found for this signature in database

View file

@ -16,14 +16,15 @@ pub fn build_facilio(
const lib = b.addLibrary(.{ const lib = b.addLibrary(.{
.name = "facil.io", .name = "facil.io",
.root_module = mod, .root_module = mod,
.linkage = .dynamic .linkage = .dynamic,
}); });
// Generate flags // Generate flags
var flags = std.ArrayList([]const u8).init(std.heap.page_allocator); var flags = std.ArrayList([]const u8).empty;
if (optimize != .Debug) try flags.append("-Os"); defer flags.deinit(b.allocator);
try flags.append("-Wno-return-type-c-linkage"); if (optimize != .Debug) try flags.append(b.allocator, "-Os");
try flags.append("-fno-sanitize=undefined"); try flags.append(b.allocator, "-Wno-return-type-c-linkage");
try flags.append(b.allocator, "-fno-sanitize=undefined");
// //
// let's not override malloc from within the lib // let's not override malloc from within the lib
@ -31,11 +32,11 @@ pub fn build_facilio(
// try flags.append("-DFIO_OVERRIDE_MALLOC"); // try flags.append("-DFIO_OVERRIDE_MALLOC");
// //
try flags.append("-DFIO_HTTP_EXACT_LOGGING"); try flags.append(b.allocator, "-DFIO_HTTP_EXACT_LOGGING");
if (target.result.abi == .musl) if (target.result.abi == .musl)
try flags.append("-D_LARGEFILE64_SOURCE"); try flags.append(b.allocator, "-D_LARGEFILE64_SOURCE");
if (use_openssl) if (use_openssl)
try flags.append("-DHAVE_OPENSSL -DFIO_TLS_FOUND"); try flags.append(b.allocator, "-DHAVE_OPENSSL -DFIO_TLS_FOUND");
// Include paths // Include paths
mod.addIncludePath(b.path(subdir ++ "/.")); mod.addIncludePath(b.path(subdir ++ "/."));