From 05e78b785d83a5269f0726abdc1c219c2a334086 Mon Sep 17 00:00:00 2001 From: Sven Balzer <4653051+Kyuusokuna@users.noreply.github.com> Date: Fri, 30 May 2025 13:01:13 +0200 Subject: [PATCH] update to zig version 0.14.1 --- build.zig | 2 +- build.zig.zon | 3 ++- zig/foundry.zig | 4 ++-- zig/libs/leveldb/build.zig | 4 ++-- zig/libs/leveldb/build.zig.zon | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build.zig b/build.zig index a6f4a75..fc98f39 100644 --- a/build.zig +++ b/build.zig @@ -8,7 +8,7 @@ pub fn build(b: *std.Build) void { const compendium_creator = b.addExecutable(.{ .name = "compendium_creator", .root_source_file = b.path("zig/compendium_creator.zig"), - .target = b.host, + .target = b.standardTargetOptions (.{}), .optimize = .Debug, }); compendium_creator.root_module.addImport("leveldb", leveldb); diff --git a/build.zig.zon b/build.zig.zon index 93b64af..78a2b71 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,6 +1,7 @@ .{ - .name = "dsa-4th-edition", + .name = .dsa41, .version = "0.0.0", + .fingerprint = 0x70fb7b387e6df0f7, .paths = .{ "build.zig", "build.zig.zon", diff --git a/zig/foundry.zig b/zig/foundry.zig index 4edcf91..eed2275 100644 --- a/zig/foundry.zig +++ b/zig/foundry.zig @@ -15,8 +15,8 @@ const SYSTEM_VERSION = system.SYSTEM_VERSION; // }, // and the other tags being the respective Foundry type name pub fn Compendium(base_type: BaseType, Entry: type) type { - if (std.meta.activeTag(@typeInfo(Entry)) != .Union) @compileError("Entry must be a tagged union."); - if (@typeInfo(Entry).Union.tag_type == null) @compileError("Entry must be a tagged union."); + if (std.meta.activeTag(@typeInfo(Entry)) != .@"union") @compileError("Entry must be a tagged union."); + if (@typeInfo(Entry).@"union".tag_type == null) @compileError("Entry must be a tagged union."); return struct { entries: []const Entry = &.{}, diff --git a/zig/libs/leveldb/build.zig b/zig/libs/leveldb/build.zig index 9f1bbb0..b26d9a1 100644 --- a/zig/libs/leveldb/build.zig +++ b/zig/libs/leveldb/build.zig @@ -27,10 +27,10 @@ fn build_leveldb(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std. static_lib.installHeadersDirectory(source.path("include"), "", .{}); if (target.result.os.tag == .windows) { - static_lib.defineCMacro("LEVELDB_PLATFORM_WINDOWS", "1"); + static_lib.root_module.addCMacro("LEVELDB_PLATFORM_WINDOWS", "1"); static_lib.addCSourceFile(.{ .file = source.path("util/env_windows.cc") }); } else { - static_lib.defineCMacro("LEVELDB_PLATFORM_POSIX", "1"); + static_lib.root_module.addCMacro("LEVELDB_PLATFORM_POSIX", "1"); static_lib.addCSourceFile(.{ .file = source.path("util/env_posix.cc") }); } diff --git a/zig/libs/leveldb/build.zig.zon b/zig/libs/leveldb/build.zig.zon index 9268d6a..4a154c6 100644 --- a/zig/libs/leveldb/build.zig.zon +++ b/zig/libs/leveldb/build.zig.zon @@ -1,6 +1,7 @@ .{ - .name = "leveldb", + .name = .leveldb, .version = "1.0.0", + .fingerprint = 0x10c9e9cb2b1d4857, .paths = .{ "build.zig", "build.zig.zon", @@ -11,5 +12,4 @@ .path = "libs/leveldb" }, }, - }