Skip to content

Commit d1a7f80

Browse files
authored
Emscripten needs its own libc (#2)
1 parent ec86094 commit d1a7f80

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

build.zig

+8-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ pub fn build(b: *std.Build) void {
3434
},
3535
});
3636
}
37-
zstbi_lib.linkLibC();
37+
38+
if (target.result.os.tag == .emscripten) {
39+
zstbi_lib.addIncludePath(.{
40+
.cwd_relative = b.pathJoin(&.{ b.sysroot.?, "/include" }),
41+
});
42+
} else {
43+
zstbi_lib.linkLibC();
44+
}
3845
b.installArtifact(zstbi_lib);
3946

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

0 commit comments

Comments
 (0)