For CPU generic AArch64 target parser will choose armv8-a:
Which will expand to features crypto, floating point and simd.
So I’d expect a much smaller list of features, and v8.5-a doesn’t sound correct either way for generic. Though your generated file’s entry for “generic” looks okay at first glance:
For the triple “aarch64v8.1a-unknown-linux-unknown” you mentioned, clang does use the generic CPU name:
$ ./clang -target aarch64v8.1a-unknown-linux-unknown /tmp/test.c -o /dev/null -###
<…>"-target-cpu" “generic” “-target-feature” “+neon” <…>
There is no similar option to llvm-mc to tell you what features it actually expands to. You could look at the test file for some hints:
Though I don’t think it’s exhaustive. If you don’t mind the hassle, adding some logging to llvm-mc might be the way to go if you can find the place with the final list of features.