authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-01-20 23:23:10 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-01-20 23:23:10 -08:00
log5507a56c5dc2d5f1264acafb094c4f7697ecd5f0
tree14b74f22ccec4191cf5f7b65c1104a0c79a8ed90
parent5be1e2de771e4daac0c2a43897d5c7e569c32282

ziginfra integration


1 files changed, 3 insertions(+), 0 deletions(-)

build.zig+3
...@@ -4,6 +4,7 @@ const deps = @import("./deps.zig");...@@ -4,6 +4,7 @@ const deps = @import("./deps.zig");
4pub fn build(b: *std.Build) void {4pub fn build(b: *std.Build) void {
5 const target = b.standardTargetOptions(.{});5 const target = b.standardTargetOptions(.{});
6 const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug;6 const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug;
7 const disable_llvm = b.option(bool, "disable_llvm", "use the non-llvm zig codegen") orelse false;
78
8 const tests = b.addTest(.{9 const tests = b.addTest(.{
9 .root_source_file = b.path("test.zig"),10 .root_source_file = b.path("test.zig"),
...@@ -11,6 +12,8 @@ pub fn build(b: *std.Build) void {...@@ -11,6 +12,8 @@ pub fn build(b: *std.Build) void {
11 .optimize = mode,12 .optimize = mode,
12 });13 });
13 deps.addAllTo(tests);14 deps.addAllTo(tests);
15 tests.use_llvm = !disable_llvm;
16 tests.use_lld = !disable_llvm;
1417
15 const test_step = b.step("test", "Run all library tests");18 const test_step = b.step("test", "Run all library tests");
16 const tests_run = b.addRunArtifact(tests);19 const tests_run = b.addRunArtifact(tests);