| ... | @@ -453,6 +453,21 @@ pub fn resolveTargetQuery(io: Io, query: Target.Query) DetectError!Target { | ... | @@ -453,6 +453,21 @@ pub fn resolveTargetQuery(io: Io, query: Target.Query) DetectError!Target { |
| 453 | if (result.cpu.arch.isXtensa() and result.abi == .call0) { | 453 | if (result.cpu.arch.isXtensa() and result.abi == .call0) { |
| 454 | result.cpu.features.removeFeature(@backingInt(Target.xtensa.Feature.windowed)); | 454 | result.cpu.features.removeFeature(@backingInt(Target.xtensa.Feature.windowed)); |
| 455 | } | 455 | } |
| | 456 | |
| | 457 | // A workaround for https://codeberg.org/ziglang/zig/issues/37215. |
| | 458 | const apple_silicon_models = [_]*const Target.Cpu.Model{ |
| | 459 | &Target.aarch64.cpu.apple_m1, |
| | 460 | &Target.aarch64.cpu.apple_m2, |
| | 461 | &Target.aarch64.cpu.apple_m3, |
| | 462 | &Target.aarch64.cpu.apple_m4, |
| | 463 | &Target.aarch64.cpu.apple_m5, |
| | 464 | }; |
| | 465 | for (apple_silicon_models) |model| { |
| | 466 | if (result.cpu.model == model) { |
| | 467 | result.cpu.features.removeFeature(@backingInt(Target.aarch64.Feature.fuse_aes)); |
| | 468 | break; |
| | 469 | } |
| | 470 | } |
| 456 | } | 471 | } |
| 457 | | 472 | |
| 458 | // It's possible that we detect the native ABI, but fail to detect the OS version or were told | 473 | // It's possible that we detect the native ABI, but fail to detect the OS version or were told |