authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-15 12:50:56 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-15 12:50:56 -08:00
logdb60f03bbd767b7bb3e87c84449ebca0b225d3c1
treef583ddf19214bad887a4de1d6b5af52eda09990d
parente0e65698ff6c9f75c9944c38f75ce66811300af1

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-zorm",10 .name = "zig-zorm",
...@@ -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);