Tblgen error while compiling LLVM / Clang source

I got this error when compiling llvm:

Included from [...]/llvm-project-10.0.0/llvm/include/llvm/IR/Intrinsics.td:1351:
[...]/llvm/llvm-project-10.0.0/llvm/include/llvm/IR/IntrinsicsAArch64.td:381:3: error: Parameter #0 has out of bounds matching number 0
   def int_aarch64_neon_abs : AdvSIMD_1Arg_Intrinsic;

The command line echoed from makefile produced this error:

[...]/llvm-project-10.0.0-b/bin/llvm-tblgen -gen-intrinsic-impl -I [...]/llvm-project-10.0.0/llvm/include/llvm/IR -I [...]/llvm-project-10.0.0/llvm/include [...]/llvm-project-10.0.0/llvm/include/llvm/IR/Intrinsics.td --write-if-changed -o ./IntrinsicImpl.inc

I have tried experiments, and specify LLVM_TARGETS_TO_BUILD only to X86, and commented out ARM architetures in Intrinsics.td, but still got error:

[...]/llvm-project-10.0.0/llvm/include/llvm/IR/Intrinsics.td:859:1: error: Parameter #0 has out of bounds matching number 0
def int_annotation : Intrinsic<[llvm_anyint_ty],
^
[...]/llvm-project-10.0.0/llvm/include/llvm/IR/Intrinsics.td:859:1: error: ParamTypes is [anonymous_12, llvm_ptr_ty, llvm_ptr_ty, llvm_i32_ty]
def int_annotation : Intrinsic<[llvm_anyint_ty],

i have similar error while building…

[ 13%] Building IntrinsicImpl.inc…
cd /Users/cozy/llvm-project/build/include/llvm/IR && …/…/…/bin/llvm-tblgen -gen-intrinsic-impl -I /Users/cozy/llvm-project/llvm/include/llvm/IR -I/Users/cozy/llvm-project/build/include -I/Users/cozy/llvm-project/llvm/include /Users/cozy/llvm-project/llvm/include/llvm/IR/Intrinsics.td --write-if-changed -o /Users/cozy/llvm-project/build/include/llvm/IR/IntrinsicImpl.inc
Included from /Users/cozy/llvm-project/llvm/include/llvm/IR/Intrinsics.td:1918:
/Users/cozy/llvm-project/llvm/include/llvm/IR/IntrinsicsAArch64.td:797:1: error: Parameter #0 has out of bounds matching number 0
def int_aarch64_crypto_bcaxs : Crypto_SHA3_3Arg_Intrinsic;
^
Included from /Users/cozy/llvm-project/llvm/include/llvm/IR/Intrinsics.td:1918:
/Users/cozy/llvm-project/llvm/include/llvm/IR/IntrinsicsAArch64.td:797:1: error: ParamTypes is [anonymous_17, anonymous_17, anonymous_17]
def int_aarch64_crypto_bcaxs : Crypto_SHA3_3Arg_Intrinsic;
^
make[2]: *** [include/llvm/IR/IntrinsicImpl.inc] Error 1
make[1]: *** [include/llvm/IR/CMakeFiles/intrinsics_gen.dir/all] Error 2
make: *** [all] Error 2
cozys-iMac:build cozy$

можно скомпилить gcc и потом уже llvm

или обойтись gcc

старый маковский компилятор не поддерживает интринсики (хотя это уже готовая утилита что-то там генерит)