Static compilation!

This commit is contained in:
2026-05-28 13:30:14 +02:00
parent 10cbf61e52
commit 3716cfa88a
300 changed files with 84470 additions and 17 deletions
+4 -3
View File
@@ -32,6 +32,7 @@ pub fn build(b: *std.Build) void {
const exe = b.addExecutable(.{
.name = "wl-main",
.linkage = .static,
.use_llvm = llvm,
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
@@ -42,9 +43,9 @@ pub fn build(b: *std.Build) void {
},
}),
});
exe.root_module.link_libc = true;
exe.root_module.linkSystemLibrary("wayland-client", .{});
exe.root_module.linkSystemLibrary("xkbcommon", .{});
exe.root_module.link_libc = false;
exe.root_module.linkSystemLibrary("wayland-client", .{ .preferred_link_mode = .static });
exe.root_module.linkSystemLibrary("xkbcommon", .{ .preferred_link_mode = .static });
exe.root_module.addIncludePath(b.path("src"));
exe.root_module.addCSourceFiles(.{