};
const flags = blk: {
var f = std.BoundedArray([]const u8, 16).init(0) catch unreachable;
f.appendSlice(&base_flags) catch unreachable;
if (builtin.cpu.arch.isX86()) {
if (std.Target.x86.featureSetHas(builtin.cpu.features, .avx2)) {
f.append("-DUSE_AVX2 -mavx2") catch unreachable;
}
if (std.Target.x86.featureSetHas(builtin.cpu.features, .sse)) {
f.append("-DUSE_SSE -msse") catch unreachable;
}
if (std.Target.x86.featureSetHas(builtin.cpu.features, .sse2)) {
f.append("-DUSE_SSE2 -msse2") catch unreachable;
}
if (std.Target.x86.featureSetHas(builtin.cpu.features, .sse3)) {
f.append("-DUSE_sse3 -msse3") catch unreachable;
}
if (std.Target.x86.featureSetHas(builtin.cpu.features, .sse4_1)) {
f.append("-DUSE_SSE41 -msse4.1") catch unreachable;
}
} else if (builtin.cpu.arch.isAARCH64()) {
// rpi4 does not report neon feature :-(
f.append("-DUSE_NEON") catch unreachable;
if (std.Target.arm.featureSetHas(builtin.cpu.features, .neon)) {
f.append("-DUSE_NEON") catch unreachable;
}
}
break :blk f.constSlice();