| ... | ... | @@ -17,6 +17,7 @@ pub fn build(b: *std.Build) void { |
| 17 | 17 | }); |
| 18 | 18 | const tag = b.option(string, "tag", "") orelse "dev"; |
| 19 | 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; |
| 20 | 21 | |
| 21 | 22 | const exe_options = b.addOptions(); |
| 22 | 23 | exe.root_module.addImport("build_options", exe_options.createModule()); |
| ... | ... | @@ -24,6 +25,8 @@ pub fn build(b: *std.Build) void { |
| 24 | 25 | |
| 25 | 26 | deps.addAllTo(exe); |
| 26 | 27 | exe.root_module.strip = strip; |
| 28 | exe.use_llvm = !disable_llvm; |
| 29 | exe.use_lld = !disable_llvm; |
| 27 | 30 | b.installArtifact(exe); |
| 28 | 31 | |
| 29 | 32 | const run_cmd = b.addRunArtifact(exe); |
| ... | ... | @@ -34,4 +37,9 @@ pub fn build(b: *std.Build) void { |
| 34 | 37 | |
| 35 | 38 | const run_step = b.step("run", "Run the app"); |
| 36 | 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 | } |