shared-memory-in-c/threads/build.zig

21 lines
549 B
Zig

const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "threads-example",
.root_source_file = .{ .path = "main.c" },
.optimize = optimize,
.target = target
});
exe.linkLibC();
const run_cmd = b.addRunArtifact(exe);
const run_step = b.step("run", "Run simple program");
run_step.dependOn(&run_cmd.step);
b.installArtifact(exe);
}