update to zig version 0.14.1

This commit is contained in:
Sven Balzer 2025-05-30 13:01:13 +02:00
parent 51d889d9cd
commit 05e78b785d
5 changed files with 9 additions and 8 deletions

View File

@ -8,7 +8,7 @@ pub fn build(b: *std.Build) void {
const compendium_creator = b.addExecutable(.{ const compendium_creator = b.addExecutable(.{
.name = "compendium_creator", .name = "compendium_creator",
.root_source_file = b.path("zig/compendium_creator.zig"), .root_source_file = b.path("zig/compendium_creator.zig"),
.target = b.host, .target = b.standardTargetOptions (.{}),
.optimize = .Debug, .optimize = .Debug,
}); });
compendium_creator.root_module.addImport("leveldb", leveldb); compendium_creator.root_module.addImport("leveldb", leveldb);

View File

@ -1,6 +1,7 @@
.{ .{
.name = "dsa-4th-edition", .name = .dsa41,
.version = "0.0.0", .version = "0.0.0",
.fingerprint = 0x70fb7b387e6df0f7,
.paths = .{ .paths = .{
"build.zig", "build.zig",
"build.zig.zon", "build.zig.zon",

View File

@ -15,8 +15,8 @@ const SYSTEM_VERSION = system.SYSTEM_VERSION;
// }, // },
// and the other tags being the respective Foundry type name // and the other tags being the respective Foundry type name
pub fn Compendium(base_type: BaseType, Entry: type) type { pub fn Compendium(base_type: BaseType, Entry: type) type {
if (std.meta.activeTag(@typeInfo(Entry)) != .Union) @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."); if (@typeInfo(Entry).@"union".tag_type == null) @compileError("Entry must be a tagged union.");
return struct { return struct {
entries: []const Entry = &.{}, entries: []const Entry = &.{},

View File

@ -27,10 +27,10 @@ fn build_leveldb(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
static_lib.installHeadersDirectory(source.path("include"), "", .{}); static_lib.installHeadersDirectory(source.path("include"), "", .{});
if (target.result.os.tag == .windows) { 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") }); static_lib.addCSourceFile(.{ .file = source.path("util/env_windows.cc") });
} else { } 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") }); static_lib.addCSourceFile(.{ .file = source.path("util/env_posix.cc") });
} }

View File

@ -1,6 +1,7 @@
.{ .{
.name = "leveldb", .name = .leveldb,
.version = "1.0.0", .version = "1.0.0",
.fingerprint = 0x10c9e9cb2b1d4857,
.paths = .{ .paths = .{
"build.zig", "build.zig",
"build.zig.zon", "build.zig.zon",
@ -11,5 +12,4 @@
.path = "libs/leveldb" .path = "libs/leveldb"
}, },
}, },
} }