This is an archive of the discontinued LLVM Phabricator instance.

[gn build] Set HAVE_MALLINFO2=1
ClosedPublic

Authored by aeubanks on Jan 21 2022, 12:00 PM.

Details

Summary

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.

Diff Detail

Event Timeline

aeubanks requested review of this revision.Jan 21 2022, 12:00 PM
aeubanks created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 21 2022, 12:00 PM
thakis accepted this revision.Jan 21 2022, 1:32 PM

I wouldn't be terribly surprised if the linux bot on http://45.33.8.238/ doesn't have that yet, so please keep an eye out for it after landing this.

This revision is now accepted and ready to land.Jan 21 2022, 1:32 PM
This revision was landed with ongoing or failed builds.Jan 21 2022, 1:39 PM
This revision was automatically updated to reflect the committed changes.

To everyone's (well, my) surprise, this broke the macOS bot instead: http://45.33.8.238/macm1/26108/step_4.txt

Should only set this to 1 on Linux and not on win and macOS :)

aeubanks reopened this revision.Jan 21 2022, 1:59 PM
This revision is now accepted and ready to land.Jan 21 2022, 1:59 PM
aeubanks updated this revision to Diff 402102.Jan 21 2022, 1:59 PM

limit to Linux/Android

This revision was landed with ongoing or failed builds.Jan 21 2022, 2:03 PM
This revision was automatically updated to reflect the committed changes.

Heads up, this did break my dev build and switching out libc is a nontrivial prospect for me for now. A configurable would be nice to have.