Commit cac12bb
committed
Add a build flag for aarch64 Neoverse 512TVB optimizations and gate behind CPU detection
`lore-base/build.rs` passed `-mcpu=neoverse-512tvb` unconditionally to the C compiler for all `linux/aarch64` targets, causing binaries to crash with `illegal hardware instruction` on hardware that does not implement SVE2 and other Neoverse 512TVB extensions. Introduce a `neoverse-512tvb` Cargo feature to opt in to the optimization, and gate it behind a `/proc/cpuinfo` SVE2 check so the flag is only applied when the hardware supports it.
Fixes #42
Signed-off-by: subhramit <subhramit.bb@live.in>1 parent 4bffa76 commit cac12bb
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
30 | 43 | | |
31 | 44 | | |
32 | 45 | | |
| |||
0 commit comments