Skip to content

Commit

Permalink
Emscripten needs its own libc (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckrowland authored Dec 15, 2024
1 parent ec86094 commit d1a7f80
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ pub fn build(b: *std.Build) void {
},
});
}
zstbi_lib.linkLibC();

if (target.result.os.tag == .emscripten) {
zstbi_lib.addIncludePath(.{
.cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/include" }),
});
} else {
zstbi_lib.linkLibC();
}
b.installArtifact(zstbi_lib);

const test_step = b.step("test", "Run zstbi tests");
Expand Down

0 comments on commit d1a7f80

Please sign in to comment.