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:
parent
3c22e9dac5
commit
5c1fa416aa
1 changed files with 9 additions and 8 deletions
|
@ -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 ++ "/."));
|
||||||
|
|
Loading…
Add table
Reference in a new issue