WoA 上只有 CLANGARM64 这一个 MSYS2 环境。
而 Emacs 的 native-comp 需要 libgccjit,这显然是一个 gcc 生态下才有的库:
This feature uses the libgccjit library, which is part of the GCC distribution, and requires that Emacs be built with support for using that library. It also requires to have GCC and Binutils (the assembler and linker) available on your system for you to be able to native-compile Lisp code.
MSYS2 也没有在 CLANGARM64 环境下提供这个库:
https://packages.msys2.org/search?t=binpkg&q=libgccjit
MSYS2 在构建 Emacs 的做法,也是 MINGW64 和 UCRT64 启用 native-comp(依赖对应的 libgccjit),而 CLANG64 和 CLANGARM64 不启用。
https://packages.msys2.org/package/mingw-w64-ucrt-x86_64-emacs?repo=ucrt64
https://packages.msys2.org/package/mingw-w64-clang-x86_64-emacs?repo=clang64
https://packages.msys2.org/package/mingw-w64-clang-aarch64-emacs?repo=clangarm64