update zig version

This commit is contained in:
Mitchell Hashimoto
2023-05-29 08:24:12 -07:00
parent 5acf7eb8fd
commit 7116ce0806
4 changed files with 8 additions and 7 deletions

View File

@@ -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",