Static compilation!
This commit is contained in:
@@ -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(.{
|
||||
|
||||
Reference in New Issue
Block a user