From 7116ce0806d2455b367dbfeff20d1e58a8fd9da4 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 29 May 2023 08:24:12 -0700 Subject: [PATCH] update zig version --- build.zig | 2 +- flake.lock | 6 +++--- pkg/fontconfig/build.zig | 5 +++-- src/Command.zig | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.zig b/build.zig index d080af020..8f5d075ab 100644 --- a/build.zig +++ b/build.zig @@ -33,7 +33,7 @@ const Version = @import("src/build/Version.zig"); // but we liberally update it. In the future, we'll be more careful about // using released versions so that package managers can integrate better. comptime { - const required_zig = "0.11.0-dev.3299+34865d693"; + const required_zig = "0.11.0-dev.3312+ab37ab33c"; const current_zig = builtin.zig_version; const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable; if (current_zig.order(min_zig) == .lt) { diff --git a/flake.lock b/flake.lock index b35b74a1d..ff0aa9009 100644 --- a/flake.lock +++ b/flake.lock @@ -126,11 +126,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1685060590, - "narHash": "sha256-tlV0ZvAAoPqoXmOcOUHKpclIwVTOeyg55E99pzlovl4=", + "lastModified": 1685233488, + "narHash": "sha256-jZSAYhEogHMu6ITf+9aXaNhM4EGPYP+cnF7OOXUB1os=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "83b52af901b570e7fa3ebe042a78999b581cbfbc", + "rev": "b12da37e8f786a0bd65a0551b2e5b7e96ed997e2", "type": "github" }, "original": { diff --git a/pkg/fontconfig/build.zig b/pkg/fontconfig/build.zig index 6a1d3b019..3b6e50b43 100644 --- a/pkg/fontconfig/build.zig +++ b/pkg/fontconfig/build.zig @@ -1,5 +1,6 @@ const std = @import("std"); const builtin = @import("builtin"); +const NativeTargetInfo = std.zig.system.NativeTargetInfo; /// Directories with our includes. const root = thisDir() ++ "../../../vendor/fontconfig-2.14.0/"; @@ -153,8 +154,8 @@ pub fn buildFontconfig( "-fno-sanitize=undefined", "-fno-sanitize-trap=undefined", }); - const arch = target.cpu_arch orelse builtin.cpu.arch; - switch (arch.ptrBitWidth()) { + const target_info = try NativeTargetInfo.detect(target); + switch (target_info.target.ptrBitWidth()) { 32 => try flags.appendSlice(&.{ "-DSIZEOF_VOID_P=4", "-DALIGNOF_VOID_P=4", diff --git a/src/Command.zig b/src/Command.zig index c54f2607e..1a9307fc5 100644 --- a/src/Command.zig +++ b/src/Command.zig @@ -248,7 +248,7 @@ pub fn expandPath(alloc: Allocator, cmd: []const u8) !?[]u8 { }; defer f.close(); const stat = try f.stat(); - if (stat.kind != .Directory and stat.mode & 0o0111 != 0) { + if (stat.kind != .directory and stat.mode & 0o0111 != 0) { return try alloc.dupe(u8, full_path); } }