authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-26 00:14:32 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-26 00:14:32 -08:00
logf130e021ffdfcfb3b44fba8f256bddc4375832e7
tree9c0a4452a9da789c54e5ecc6ae5769454a79fce7
parent433859a3033e400bc9245b602beb4909a60552b3

build.zig: update for zig 0.11.0


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

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