Prevent building example when use as module

This commit is contained in:
adrien 2026-05-21 23:33:54 +02:00
parent d503ce7dea
commit e61c5f775d

View File

@ -29,6 +29,7 @@ pub fn build(b: *std.Build) !void {
mod.linkSystemLibrary("gcc_s", .{}); mod.linkSystemLibrary("gcc_s", .{});
} }
if (b.pkg_hash.len == 0) {
var threaded: std.Io.Threaded = .init_single_threaded; var threaded: std.Io.Threaded = .init_single_threaded;
const io = threaded.io(); const io = threaded.io();
@ -56,4 +57,5 @@ pub fn build(b: *std.Build) !void {
const run_cmd = b.addRunArtifact(exe); const run_cmd = b.addRunArtifact(exe);
run_step.dependOn(&run_cmd.step); run_step.dependOn(&run_cmd.step);
} }
}
} }