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 {
1717 });
1818 const tag = b.option(string, "tag", "") orelse "dev";
1919 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
2122 const exe_options = b.addOptions();
2223 exe.root_module.addImport("build_options", exe_options.createModule());
......@@ -24,6 +25,8 @@ pub fn build(b: *std.Build) void {
2425
2526 deps.addAllTo(exe);
2627 exe.root_module.strip = strip;
28 exe.use_llvm = !disable_llvm;
29 exe.use_lld = !disable_llvm;
2730 b.installArtifact(exe);
2831
2932 const run_cmd = b.addRunArtifact(exe);
......@@ -34,4 +37,9 @@ pub fn build(b: *std.Build) void {
3437
3538 const run_step = b.step("run", "Run the app");
3639 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);
3745}