Problem compiling the latest LLVM

Hi, I am trying to build the latest LLVM and am seeing an error. I think it is related to the new C++20, but am not sure.

Below is my cmake command. I am trying to compile for ARM:


I am getting the following error:

/home/kmaeng/llvm-build/include/c++/v1/__compare/compare_three_way_result.h:28:45: error: expected primary-expression before ‘>’ token
28 | declval<__make_const_lvalue_ref<_Tp>>() <=> declval<__make_const_lvalue_ref<_Up>>(), void()

I am suspecting it is something related to the new three way comparison but cannot figure out how to fix it.

My cmake version is 3.16.3 and my g++ version is 9.3.0. I am using Ubuntu.

If you have any ideas or suggestions, it would be highly appreciated.

Thank you,

Best regards,

Kiwan Maeng