[gn build] Set HAVE_MALLINFO2=1

I'm seeing deprecated warnings due to using mallinfo() instead of
mallinfo2().

  ../../llvm/lib/Support/Unix/Process.inc:98:10: warning: 'mallinfo' is deprecated [-Wdeprecated-declarations]
    mi = ::mallinfo();

mallinfo2() is part of glibc 2.33 which was released in Feb 2021, which
is fairly recent but I think gn users should be using fairly up to date
glibcs.

If this breaks people we could make this a gn arg instead.

Differential Revision: https://reviews.llvm.org/D117916
This commit is contained in:
Arthur Eubanks 2022-01-21 11:55:17 -08:00
parent 705d8c49f9
commit 6df05697ca
1 changed files with 2 additions and 1 deletions

View File

@ -89,7 +89,6 @@ write_cmake_config("config") {
"HAVE_LIBPFM=",
"HAVE_LIBPSAPI=",
"HAVE_MALLCTL=",
"HAVE_MALLINFO2=",
"HAVE_SIGNAL_H=1",
"HAVE_STD_IS_TRIVIALLY_COPYABLE=1",
"HAVE_STRERROR=1",
@ -143,6 +142,7 @@ write_cmake_config("config") {
"HAVE_LINK_H=1",
"HAVE_LSEEK64=1",
"HAVE_MALLINFO=1",
"HAVE_MALLINFO2=1",
"HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=1",
]
} else {
@ -151,6 +151,7 @@ write_cmake_config("config") {
"HAVE_LINK_H=",
"HAVE_LSEEK64=",
"HAVE_MALLINFO=",
"HAVE_MALLINFO2=",
"HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=",
]
}