From 1a92842f86556d83b824b56ef4f764328cd40f58 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Mon, 1 Jun 2026 16:15:29 -0700 Subject: [PATCH] update to zig 0.15.2 --- build.zig | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/build.zig b/build.zig index 12b7268f21f094f9fe7ac86fa37205d639fe9424..9f9cf2fc47312bcd599d014e7c4e4df9e3b582da 100644 --- a/build.zig +++ b/build.zig @@ -3,13 +3,15 @@ const deps = @import("./deps.zig"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); - const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug; + const mode = b.option(std.builtin.OptimizeMode, "mode", "") orelse .Debug; const disable_llvm = b.option(bool, "disable_llvm", "use the non-llvm zig codegen") orelse false; const tests = b.addTest(.{ - .root_source_file = b.path("test.zig"), - .target = target, - .optimize = mode, + .root_module = b.createModule(.{ + .root_source_file = b.path("test.zig"), + .target = target, + .optimize = mode, + }), }); deps.addAllTo(tests); tests.use_llvm = !disable_llvm; @@ -42,11 +44,14 @@ pub fn build(b: *std.Build) void { } fn addFuzzer(b: *std.Build, target: std.Build.ResolvedTarget, comptime name: []const u8, afl_clang_args: []const []const u8) *std.Build.Step.InstallFile { - const fuzz_lib = b.addStaticLibrary(.{ + const fuzz_lib = b.addLibrary(.{ + .linkage = .static, .name = "fuzz-" ++ name ++ "-lib", - .root_source_file = b.path("fuzz/main.zig"), - .target = target, - .optimize = .Debug, + .root_module = b.createModule(.{ + .root_source_file = b.path("fuzz/main.zig"), + .target = target, + .optimize = .Debug, + }), }); fuzz_lib.want_lto = true; fuzz_lib.bundle_compiler_rt = true; -- 2.54.0