If you are using an old enough glibc which doesn't have mallinfo2, set
llvm_have_mallinfo2 = false.
At this point it's likely that most people using the gn build are
compiling against a recent enough glibc (glibc 2.33 which was released
in Feb 2021).