Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/root.zig
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ fn isSupported() bool {
return true;
}

if (builtin.cpu.arch == .x86_64 and (std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .avx512f, .avx512vl }) or
std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .avx2, .bmi2 }) or
std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .sha, .avx })))
// hashtree_hash selects SHA-NI, AVX-512, AVX2, AVX, SSE or generic C at runtime, so this must not depend on the
// compile-time CPU. The x86 backends are assembled on the same targets as in build.zig.
if (builtin.cpu.arch == .x86_64 and
builtin.os.tag != .macos and
!(builtin.os.tag == .windows and builtin.abi == .msvc))
{
return true;
}
Expand Down
Loading