diff --git a/build.zig b/build.zig index fd89fa3dfb5c4c076483ea203b95805508384c33..139d17818965142166a9090926c426e5fccf69d7 100644 --- a/build.zig +++ b/build.zig @@ -4,6 +4,7 @@ const deps = @import("./deps.zig"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug; + const disable_llvm = b.option(bool, "disable_llvm", "use the non-llvm zig codegen") orelse false; const gen_step = b.step("generate", ""); const gen_cmd = b.addSystemCommand(&.{ "bun", "./generate.ts" }); @@ -19,6 +20,8 @@ pub fn build(b: *std.Build) void { .optimize = mode, }); deps.addAllTo(tests); + tests.use_llvm = !disable_llvm; + tests.use_lld = !disable_llvm; const test_step = b.step("test", "Run all library tests"); const tests_run = b.addRunArtifact(tests);