<div dir="ltr"><div>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.</div><div><br></div><div>Below is my cmake command. I am trying to compile for ARM:</div><div><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt" role="presentation"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">cmake -G "Unix Makefiles" -DCMAKE_CROSSCOMPILING=True -DLLVM_OPTIMIZED_TABLEGEN=1 -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=ARM -DLLVM_TARGET_ARCH=ARMV7EM -DLLVM_DEFAULT_TARGET_TRIPLE=armv7em-none-eabihf -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;compiler-rt;lld" -DCMAKE_LINKER=/usr/bin/ld.gold -DCMAKE_INSTALL_PREFIX=../llvm-install/ ../llvm-src/llvm/</span></p>

</div><div><br></div><div>I am getting the following error:<br></div><div>/home/kmaeng/llvm-build/include/c++/v1/__compare/compare_three_way_result.h:28:45: error: expected primary-expression before ‘>’ token<br>   28 |   declval<__make_const_lvalue_ref<_Tp>>() <=> declval<__make_const_lvalue_ref<_Up>>(), void()<br><br></div><div>I am suspecting it is something related to the new three way comparison but cannot figure out how to fix it.<br></div><div>My cmake version is 3.16.3 and my g++ version is 9.3.0. I am using Ubuntu.<br><br></div><div>If you have any ideas or suggestions, it would be highly appreciated.<br><br></div><div>Thank you,<br></div><div>Best regards,<br></div><div>Kiwan Maeng<br></div></div>