meson: Fix detecting the modern aarch64 architecture extensions
I tried out the meson wrapping of ffmpeg, and looked in particular a bit about the aarch64 assembly feature detection parts; this is a small assortment of the fixes I found to make.
The first commit just cleans up/simplifies the configure_file()
/cc.compiles()
testing - removing the input: 'configure',
bit which seems to be entirely redundant (no input file name is needed?), and getting rid of the ['-x', 'assembler']
which does seem to break with some versions of Clang.
The second one fixes up the detection of the aarch64 extensions, testing .arch <level>
in various ways like upstream does, and testing whether .arch_extension
works for each of the extensions. While the assembly detection might not be enabled by default, this commit should get it into better working shape, matching upstream closer.
The third one is more of a suggestion/question - automatically enabling can_run_asm_checks
if running with a new enough Meson version (while it still does warn about using features that requires Meson 1.2.0, while the project is marked as requiring less than that).
This MR is maybe mostly a showcase of what I hacked together; if you're interested in picking one bit but not the other, I can amend the MR and drop parts, or split things out into individual MRs (although patch 2 is quite entangled on top of patch 1).