authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-15 12:52:26 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-15 12:52:26 -08:00
logc1544e2edc7c0a3fb0dd0c60d9485acac5eac4ad
tree46c1ba49c1bb2d9c333acbe1fb51daf6717d26da
parentfadda0c00091c8c83d63904ddc0969d7fb8e9ae6

add disable_llvm build param


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

build.zig+5
......@@ -4,6 +4,7 @@ const deps = @import("./deps.zig");
44pub fn build(b: *std.Build) void {
55 const target = b.standardTargetOptions(.{});
66 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
89 const exe = b.addExecutable(.{
910 .name = "zig-leven",
......@@ -12,6 +13,8 @@ pub fn build(b: *std.Build) void {
1213 .optimize = mode,
1314 });
1415 deps.addAllTo(exe);
16 exe.use_llvm = !disable_llvm;
17 exe.use_lld = !disable_llvm;
1518 b.installArtifact(exe);
1619
1720 const run_cmd = b.addRunArtifact(exe);
......@@ -28,6 +31,8 @@ pub fn build(b: *std.Build) void {
2831 .target = target,
2932 .optimize = mode,
3033 });
34 tests.use_llvm = !disable_llvm;
35 tests.use_lld = !disable_llvm;
3136 deps.addAllTo(tests);
3237
3338 const test_step = b.step("test", "Run all library tests");