Return the CPU micro architecture, assuming a Linux target, we should use for Rust compilation. Sync: This target-cpu should be kept in sync with the one in ci-builder and .cargo/config.
(arch: Arch)
| 55 | |
| 56 | |
| 57 | def target_cpu(arch: Arch) -> str: |
| 58 | """ |
| 59 | Return the CPU micro architecture, assuming a Linux target, we should use for Rust compilation. |
| 60 | |
| 61 | Sync: This target-cpu should be kept in sync with the one in ci-builder and .cargo/config. |
| 62 | """ |
| 63 | if arch == Arch.X86_64: |
| 64 | return "x86-64-v3" |
| 65 | elif arch == Arch.AARCH64: |
| 66 | return "neoverse-n1" |
| 67 | else: |
| 68 | raise RuntimeError("unreachable") |
| 69 | |
| 70 | |
| 71 | def target_features(arch: Arch) -> list[str]: |