update build.zig in threads

This commit is contained in:
Rokas Puzonas 2024-01-06 21:09:44 +02:00
parent 48e0a65413
commit 7761accd98

View File

@ -4,19 +4,17 @@ pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
{
const exe = b.addExecutable(.{
.name = "threads-simple",
.root_source_file = .{ .path = "main.c" },
.optimize = optimize,
.target = target
});
exe.linkLibC();
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);
const run_cmd = b.addRunArtifact(exe);
const run_step = b.step("run", "Run simple program");
run_step.dependOn(&run_cmd.step);
b.installArtifact(exe);
}
b.installArtifact(exe);
}