diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-10-16 00:32:56 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-10-16 00:33:10 +0200 |
| commit | 1bca53cc20f3b974d811a09addef84a6163c9c92 (patch) | |
| tree | 32c4763370c3e0b2d6add04046613e2c3184b9ff /lib/std/simd.zig | |
| parent | 7b8fc18c666ba6952ad1571fbed4cc48e81f647d (diff) | |
| download | zig-1bca53cc20f3b974d811a09addef84a6163c9c92.tar.gz zig-1bca53cc20f3b974d811a09addef84a6163c9c92.zip | |
std.Target: Change Cpu.baseline() to also be able to take OS into consideration.
Diffstat (limited to 'lib/std/simd.zig')
| -rw-r--r-- | lib/std/simd.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/simd.zig b/lib/std/simd.zig index 6817c7e082..c570c36615 100644 --- a/lib/std/simd.zig +++ b/lib/std/simd.zig @@ -90,7 +90,7 @@ pub fn suggestVectorLength(comptime T: type) ?comptime_int { } test "suggestVectorLengthForCpu works with signed and unsigned values" { - comptime var cpu = std.Target.Cpu.baseline(std.Target.Cpu.Arch.x86_64); + comptime var cpu = std.Target.Cpu.baseline(std.Target.Cpu.Arch.x86_64, builtin.os); comptime cpu.features.addFeature(@intFromEnum(std.Target.x86.Feature.avx512f)); comptime cpu.features.populateDependencies(&std.Target.x86.all_features); const expected_len: usize = switch (builtin.zig_backend) { |
