From 62f9fd44a89b05f449f9a18686ce8bb9feff1b24 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Tue, 1 Aug 2023 13:26:14 -0700 Subject: [PATCH] add lambda build options --- build.zig | 4 +++- build.zig.zon | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 build.zig.zon diff --git a/build.zig b/build.zig index 956f32e..599b6bc 100644 --- a/build.zig +++ b/build.zig @@ -3,7 +3,7 @@ const std = @import("std"); // Although this function looks imperative, note that its job is to // declaratively construct a build graph that will be executed by an external // runner. -pub fn build(b: *std.Build) void { +pub fn build(b: *std.Build) !void { // Standard target options allows the person running `zig build` to choose // what target to build for. Here we do not override the defaults, which // means any target is allowed, and the default is native. Other options @@ -24,6 +24,8 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); + try @import("lambda-zig").lambdaBuildOptions(b, exe); + // This declares intent for the executable to be installed into the // standard location when the user invokes the "install" step (the default // step when running `zig build`). diff --git a/build.zig.zon b/build.zig.zon new file mode 100644 index 0000000..0ee9f96 --- /dev/null +++ b/build.zig.zon @@ -0,0 +1,10 @@ +.{ + .name = "lambda-zig", + .version = "0.1.0", + .dependencies = .{ + .@"lambda-zig" = .{ + .url = "https://git.lerch.org/lobo/lambda-zig/archive/fa13a08c4d91034a9b19d85f8c4c0af4cedaa67e.tar.gz", + .hash = "122037c357f834ffddf7b3a514f55edd5a4d7a3cde138a4021b6ac51be8fd2926000", + }, + }, +}