Skip to content

Commit 12c8242

Browse files
committed
link libc in test runner
1 parent 812bb36 commit 12c8242

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

build.zig

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ pub fn build(b: *std.Build) void {
2020

2121
// Tests
2222

23-
const tests = b.addTest(.{ .root_module = b.createModule(.{
24-
.target = target,
25-
.optimize = optimize,
26-
.root_source_file = b.path("src/test.zig"),
27-
.imports = &.{
28-
.{ .name = "quickjs", .module = quickjs },
29-
},
30-
}) });
23+
const tests = b.addTest(.{
24+
.root_module = b.createModule(.{
25+
.target = target,
26+
.optimize = optimize,
27+
.root_source_file = b.path("src/test.zig"),
28+
}),
29+
});
30+
31+
tests.root_module.addImport("quickjs", quickjs);
32+
tests.linkLibC();
3133

3234
const test_runner = b.addRunArtifact(tests);
3335

0 commit comments

Comments
 (0)