From 5f53ffc3adbd809f5b2c92ddb7e7d0d16f5a26b5 Mon Sep 17 00:00:00 2001 From: Ben Buhse Date: Thu, 2 Oct 2025 17:13:32 -0500 Subject: [PATCH] Upgrade to zig 0.15.1 --- build.zig | 22 ++++++++++++---------- build.zig.zon | 6 +++--- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/build.zig b/build.zig index 38f1c7d..4179187 100644 --- a/build.zig +++ b/build.zig @@ -11,7 +11,6 @@ pub fn build(b: *std.Build) void { const strip = b.option(bool, "strip", "Omit debug information") orelse false; const pie = b.option(bool, "pie", "Build a Position Independent Executable") orelse false; - const llvm = !(b.option(bool, "no-llvm", "(expirimental) Use non-LLVM x86 Zig backend") orelse false); const scanner = Scanner.create(b, .{}); const wayland = b.createModule(.{ .root_source_file = scanner.result }); @@ -25,12 +24,12 @@ pub fn build(b: *std.Build) void { const exe = b.addExecutable(.{ .name = "beansprout", - .root_source_file = b.path("src/main.zig"), - .target = target, - .optimize = optimize, - .strip = strip, - .use_llvm = llvm, - .use_lld = llvm, + .root_module = b.createModule(.{ + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + .strip = strip, + }), }); exe.pie = pie; @@ -70,9 +69,12 @@ pub fn build(b: *std.Build) void { // check step used for zls to give comptime info const exe_check = b.addExecutable(.{ .name = "beansprout", - .root_source_file = b.path("src/main.zig"), - .target = target, - .optimize = optimize, + .root_module = b.createModule(.{ + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + .strip = strip, + }), }); exe_check.root_module.addImport("wayland", wayland); diff --git a/build.zig.zon b/build.zig.zon index 1f6315b..2ee0788 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -5,12 +5,12 @@ .fingerprint = 0x145dac71c283d187, // Changing this has security and trust implications. - .minimum_zig_version = "0.14.0", + .minimum_zig_version = "0.15.1", .dependencies = .{ .wayland = .{ - .url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.3.0.tar.gz", - .hash = "wayland-0.3.0-lQa1kjPIAQDmhGYpY-zxiRzQJFHQ2VqhJkQLbKKdt5wl", + .url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.4.0.tar.gz", + .hash = "wayland-0.4.0-lQa1khbMAQAsLS2eBR7M5lofyEGPIbu2iFDmoz8lPC27", }, },