Returns a list of CPU features we should enable for Rust compilation. Note: We also specify the CPU target when compiling Rust which should enable the majority of available CPU features. Sync: This list of features should be kept in sync with the one in ci-builder and .cargo/confi
(arch: Arch)
| 69 | |
| 70 | |
| 71 | def target_features(arch: Arch) -> list[str]: |
| 72 | """ |
| 73 | Returns a list of CPU features we should enable for Rust compilation. |
| 74 | |
| 75 | Note: We also specify the CPU target when compiling Rust which should enable the majority of |
| 76 | available CPU features. |
| 77 | |
| 78 | Sync: This list of features should be kept in sync with the one in ci-builder and .cargo/config. |
| 79 | """ |
| 80 | if arch == Arch.X86_64: |
| 81 | return ["+aes", "+pclmulqdq"] |
| 82 | elif arch == Arch.AARCH64: |
| 83 | return ["+aes", "+sha2"] |
| 84 | else: |
| 85 | raise RuntimeError("unreachable") |
| 86 | |
| 87 | |
| 88 | def cargo( |