From 84c316724303bfa0c31892ceafeca68ef19709a6 Mon Sep 17 00:00:00 2001 From: Jora Troosh Date: Fri, 19 Jul 2024 13:17:11 +0300 Subject: [PATCH] feat: enable x86 cpu features --- build.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 1033d7e..96834a7 100644 --- a/build.zig +++ b/build.zig @@ -23,8 +23,11 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); - var flags = std.BoundedArray([]const u8, 4){}; + var flags = std.BoundedArray([]const u8, 3){}; flags.appendSliceAssumeCapacity(&FLAGS); + if (target.result.cpu.arch.isX86()) { + flags.appendSliceAssumeCapacity(&.{ "-msse2", "-mssse3" }); + } if (use_curl) { lib.linkSystemLibrary("curl"); flags.appendAssumeCapacity("-DCFITSIO_HAVE_CURL");