diff --git a/build.zig b/build.zig index 00497eb26c73b293776e0078c227d66bbf5222b9..c45b0864f94487138e189ecc8eb8633e3a5a69e8 100644 --- a/build.zig +++ b/build.zig @@ -15,7 +15,7 @@ pub fn build(b: *std.Build) void { }), }); deps.addAllTo(test_exe); - test_exe.linkLibC(); + test_exe.root_module.link_libc = true; test_exe.use_llvm = !disable_llvm; test_exe.use_lld = !disable_llvm; b.getInstallStep().dependOn(&test_exe.step); @@ -59,7 +59,7 @@ fn addFuzzer(b: *std.Build, target: std.Build.ResolvedTarget, comptime name: []c .optimize = .Debug, }), }); - fuzz_lib.want_lto = true; + fuzz_lib.lto = .full; fuzz_lib.bundle_compiler_rt = true; fuzz_lib.use_llvm = true; fuzz_lib.use_lld = true; diff --git a/fuzz/main.zig b/fuzz/main.zig index cff0280651585a5cde7d5943389265ec5beeee64..a27fc83092c9102b7755a42b67be7c5746f57e5c 100644 --- a/fuzz/main.zig +++ b/fuzz/main.zig @@ -3,7 +3,7 @@ const json = @import("json"); const nfs = @import("nfs"); pub export fn main() void { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; + var gpa = std.heap.DebugAllocator(.{}){}; defer std.debug.assert(gpa.deinit() == .ok); const allocator = gpa.allocator();