master
 1const std = @import("std");
 2const builtin = @import("builtin");
 3
 4pub fn build(b: *std.Build) void {
 5    const target = b.standardTargetOptions(.{});
 6    const optimize = b.standardOptimizeOption(.{});
 7
 8    if (builtin.os.tag == .windows) return; // TODO: libfuzzer support for windows
 9
10    const run_step = b.step("run", "Run executables");
11    const exe = b.addExecutable(.{
12        .name = "main",
13        .root_module = b.createModule(.{
14            .root_source_file = b.path("main.zig"),
15            .target = target,
16            .optimize = optimize,
17            .fuzz = true,
18        }),
19        .use_llvm = true, // #23423
20    });
21
22    b.installArtifact(exe);
23    b.default_step = run_step;
24
25    const run_artifact = b.addRunArtifact(exe);
26    run_artifact.addArg(b.cache_root.path orelse "");
27    run_step.dependOn(&run_artifact.step);
28}