authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-15 12:52:43 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-15 12:52:43 -08:00
log4489a2ed0b3f90e962527eaf9ac9c0203a99094a
treecc1356d742478d3f98f94a2cfce544dad626fa77
parent54c2e792a3916fa227322f62bfe8f5a01a25aac4

add disable_llvm build param


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);