pkg/highway: upgrade to fix compilation issues on LLVM18

This commit is contained in:
Mitchell Hashimoto
2025-03-12 10:27:20 -07:00
parent 7e9be00924
commit 601acf4059
6 changed files with 28 additions and 6 deletions

View File

@@ -76,6 +76,7 @@ pub fn build(b: *std.Build) !void {
.root = upstream.path(""),
.flags = flags.items,
.files = &.{
"hwy/abort.cc",
"hwy/aligned_allocator.cc",
"hwy/nanobenchmark.cc",
"hwy/per_target.cc",

View File

@@ -1,13 +1,13 @@
.{
.name = .highway,
.version = "1.1.0",
.version = "1.2.0",
.fingerprint = 0xdbcf1a7425023274,
.paths = .{""},
.dependencies = .{
// google/highway
.highway = .{
.url = "https://deps.files.ghostty.org/highway-12205c83b8311a24b1d5ae6d21640df04f4b0726e314337c043cde1432758cbe165b.tar.gz",
.hash = "N-V-__8AAGCXYgBcg7gxGiSx1a5tIWQN8E9LBybjFDN8BDze",
.url = "https://deps.files.ghostty.org/highway-66486a10623fa0d72fe91260f96c892e41aceb06.tar.gz",
.hash = "N-V-__8AAGmZhABbsPJLfbqrh6JTHsXhY6qCaLAQyx25e0XE",
},
.apple_sdk = .{ .path = "../apple-sdk" },

View File

@@ -1,8 +1,28 @@
const std = @import("std");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const target = target: {
var query = b.standardTargetOptionsQueryOnly(.{});
// This works around a Zig 0.14 bug where targeting an iOS
// simulator sets our CPU model to be "apple_a7" which is
// too outdated to support SIMD features and is also wrong.
// Simulator binaries run on the host CPU so target native.
//
// We can remove this when the following builds without
// issue without this line:
//
// zig build -Dtarget=aarch64-ios.17.0-simulator
//
if (query.abi) |abi| {
if (abi == .simulator) {
query.cpu_model = .native;
}
}
break :target b.resolveTargetQuery(query);
};
const lib = b.addStaticLibrary(.{
.name = "simdutf",