authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-04 19:52:48 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-08 01:45:51 -07:00
logd7457589a5d85d3005e6e2dfc0748bb704e82bbb
treef0d00969ee86d4eca83a7c2e216aa32d74d65744
parentd972c0b2b595d264a5ab8496fc10f39beb6f5bc6
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

update to zig 0.16.0


2 files changed, 6 insertions(+), 3 deletions(-)

build.zig+5-2
......@@ -31,6 +31,7 @@ pub fn build(b: *std.Build) void {
3131 //
3232
3333 const fuzz_exe = addFuzzer(b, target, "yaml", &.{});
34 b.getInstallStep().dependOn(&fuzz_exe.step);
3435
3536 const fuzz_run = b.addSystemCommand(&.{"afl-fuzz"});
3637 fuzz_run.step.dependOn(&fuzz_exe.step);
......@@ -54,17 +55,19 @@ fn addFuzzer(b: *std.Build, target: std.Build.ResolvedTarget, comptime name: []c
5455 .optimize = .Debug,
5556 }),
5657 });
57 fuzz_lib.want_lto = true;
58 fuzz_lib.lto = .full;
5859 fuzz_lib.bundle_compiler_rt = true;
5960 fuzz_lib.use_llvm = true;
6061 fuzz_lib.use_lld = true;
6162 fuzz_lib.root_module.pic = true;
63 fuzz_lib.root_module.link_libc = true;
64 fuzz_lib.bundle_ubsan_rt = true;
6265
6366 deps.addAllTo(fuzz_lib);
6467
6568 const fuzz_executable_name = "fuzz-" ++ name;
6669
67 const fuzz_compile = b.addSystemCommand(&.{ "afl-clang-lto", "-v", "-o" });
70 const fuzz_compile = b.addSystemCommand(&.{ "afl-clang-lto", "-o" });
6871 const output_path = fuzz_compile.addOutputFileArg(fuzz_executable_name);
6972 fuzz_compile.addArtifactArg(fuzz_lib);
7073 fuzz_compile.addArgs(afl_clang_args);
fuzz/main.zig+1-1
......@@ -3,7 +3,7 @@ const yaml = @import("yaml");
33const nfs = @import("nfs");
44
55pub export fn main() void {
6 var gpa = std.heap.GeneralPurposeAllocator(.{}){};
6 var gpa = std.heap.DebugAllocator(.{}){};
77 defer std.debug.assert(gpa.deinit() == .ok);
88 const allocator = gpa.allocator();
99