authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-10 15:41:08 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-10 15:41:08 -07:00
loge7288924c44ce5200607309de303e442a6248d6a
treeffc1f6185d9fb4ec1c483c58fc2cbe831fc04820
parent9d8f82035e63c80ffadb7bd5fc47248783d29167

add support for integrating in ziginfra


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

build.zig+8
...@@ -17,6 +17,7 @@ pub fn build(b: *std.Build) void {...@@ -17,6 +17,7 @@ pub fn build(b: *std.Build) void {
17 });17 });
18 const tag = b.option(string, "tag", "") orelse "dev";18 const tag = b.option(string, "tag", "") orelse "dev";
19 const strip = b.option(bool, "strip", "Build without debug info.") orelse false;19 const strip = b.option(bool, "strip", "Build without debug info.") orelse false;
20 const disable_llvm = b.option(bool, "disable_llvm", "use the non-llvm zig codegen") orelse false;
2021
21 const exe_options = b.addOptions();22 const exe_options = b.addOptions();
22 exe.root_module.addImport("build_options", exe_options.createModule());23 exe.root_module.addImport("build_options", exe_options.createModule());
...@@ -24,6 +25,8 @@ pub fn build(b: *std.Build) void {...@@ -24,6 +25,8 @@ pub fn build(b: *std.Build) void {
2425
25 deps.addAllTo(exe);26 deps.addAllTo(exe);
26 exe.root_module.strip = strip;27 exe.root_module.strip = strip;
28 exe.use_llvm = !disable_llvm;
29 exe.use_lld = !disable_llvm;
27 b.installArtifact(exe);30 b.installArtifact(exe);
2831
29 const run_cmd = b.addRunArtifact(exe);32 const run_cmd = b.addRunArtifact(exe);
...@@ -34,4 +37,9 @@ pub fn build(b: *std.Build) void {...@@ -34,4 +37,9 @@ pub fn build(b: *std.Build) void {
3437
35 const run_step = b.step("run", "Run the app");38 const run_step = b.step("run", "Run the app");
36 run_step.dependOn(&run_cmd.step);39 run_step.dependOn(&run_cmd.step);
40
41 //
42
43 const test_step = b.step("test", "Stub for ziginfra");
44 test_step.dependOn(&exe.step);
37}45}