authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-26 00:11:00 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-26 00:11:00 -08:00
log9df12950369ee5b1278ca4e8bf6d68bc4ee5c944
tree1d4668c7f8039dd4d91e09ef0b478a428fd4f7de
parent5df8576c3bf86c5393d4eeb197e9cc3938c03f2d

build.zig: update for zig 0.11.0


1 files changed, 11 insertions(+), 13 deletions(-)

build.zig+11-13
......@@ -1,22 +1,20 @@
11const std = @import("std");
2const deps = @import("./deps.zig");
23
34pub fn build(b: *std.build.Builder) void {
4 // Standard target options allows the person running `zig build` to choose
5 // what target to build for. Here we do not override the defaults, which
6 // means any target is allowed, and the default is native. Other options
7 // for restricting supported target set are available.
85 const target = b.standardTargetOptions(.{});
6 const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug;
97
10 // Standard release options allow the person running `zig build` to select
11 // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
12 const mode = b.standardReleaseOptions();
8 const exe = b.addExecutable(.{
9 .name = "zig-flag",
10 .root_source_file = .{ .path = "src/main.zig" },
11 .target = target,
12 .optimize = mode,
13 });
14 deps.addAllTo(exe);
15 b.installArtifact(exe);
1316
14 const exe = b.addExecutable("zig-flag", "src/main.zig");
15 exe.setTarget(target);
16 exe.setBuildMode(mode);
17 exe.install();
18
19 const run_cmd = exe.run();
17 const run_cmd = b.addRunArtifact(exe);
2018 run_cmd.step.dependOn(b.getInstallStep());
2119 if (b.args) |args| {
2220 run_cmd.addArgs(args);