aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-25 13:08:02 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-25 13:08:02 +0200
commit15b59f86316f823128be2c66044ee188f9f51394 (patch)
treef2ae4616049270f1a3c6698dc8d6eaf03293458f /build.zig
parent22c7aa339407042682eef78f7d1ae1398e1d9b79 (diff)
perf(lib): use target specific allocator
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/build.zig b/build.zig
index 03c07d7..49ef164 100644
--- a/build.zig
+++ b/build.zig
@@ -8,8 +8,8 @@ pub fn build(b: *std.Build) void {
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
- .link_libc = true,
});
+ if (!target.result.isWasiLibC()) mod.link_libc = true;
const lib = b.addLibrary(.{
.name = "typdown",
.linkage = .dynamic,
@@ -22,9 +22,9 @@ pub fn build(b: *std.Build) void {
const example = b.addExecutable(.{
.name = "example",
.root_module = b.createModule(.{
- .link_libc = true,
.target = target,
.optimize = optimize,
+ .link_libc = true,
}),
});
example.root_module.addCSourceFile(.{