authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-15 12:52:09 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-15 12:52:09 -08:00
logd6005ee08b2f5ce3c4554fa7f91e733f58b1a434
tree87ae223da946d48d60c934d051e276d2cbf1598c
parent1f19d4d7063527c03de16ca32e314c71df2cf1e8

add disable_llvm build param


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

build.zig+5
...@@ -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 exe = b.addExecutable(.{9 const exe = b.addExecutable(.{
9 .name = "zig-inquirer",10 .name = "zig-inquirer",
...@@ -12,6 +13,8 @@ pub fn build(b: *std.Build) void {...@@ -12,6 +13,8 @@ pub fn build(b: *std.Build) void {
12 .optimize = mode,13 .optimize = mode,
13 });14 });
14 deps.addAllTo(exe);15 deps.addAllTo(exe);
16 exe.use_llvm = !disable_llvm;
17 exe.use_lld = !disable_llvm;
15 b.installArtifact(exe);18 b.installArtifact(exe);
1619
17 const run_cmd = b.addRunArtifact(exe);20 const run_cmd = b.addRunArtifact(exe);
...@@ -29,6 +32,8 @@ pub fn build(b: *std.Build) void {...@@ -29,6 +32,8 @@ pub fn build(b: *std.Build) void {
29 .optimize = mode,32 .optimize = mode,
30 });33 });
31 deps.addAllTo(tests);34 deps.addAllTo(tests);
35 tests.use_llvm = !disable_llvm;
36 tests.use_lld = !disable_llvm;
3237
33 const test_step = b.step("test", "Run all library tests");38 const test_step = b.step("test", "Run all library tests");
34 const tests_run = b.addRunArtifact(tests);39 const tests_run = b.addRunArtifact(tests);