[cfe-dev] newbie

via cfe-dev cfe-dev at lists.llvm.org
Tue Mar 6 15:20:03 PST 2018


Hi Chris,
My experience is that by far the peak memory consumption occurs during linking.  Compilations don't use much.  And debug configurations seriously increase memory consumption during linking.  This means, perversely, that it's likely faster to do a Release build than a Debug build.  I basically never do a Debug build because it takes too long.
I am curious what configuration you used (probably Debug?) and how many parallel threads you had.  Because linking is the memory hog, you might try using '-DLLVM_PARALLEL_LINK_JOBS=1'  which might help avoid swapping (which *seriously* slows down a build).
HTH,
--paulr

P.S. Yeah, some cautionary words about memory consumption seem like a good idea.

From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Chris Moller via cfe-dev
Sent: Tuesday, March 06, 2018 8:38 AM
To: cfe-dev at lists.llvm.org
Subject: [cfe-dev] newbie

I just found clang/llvm a few days ago.  It looks very cool, but if you  don't mind a right-off-the-bat observation, somewhere in the Unix-like build recipe it would be very handy if you'd caution new users about the memory size need to build clang.  My machine has 4GB of RAM and I had another 4GB of swap space--and that wasn't enough.  Another 4GB of swap wasn't enough.  Ultimately, I  had to tick it up to a total of 10GB of swap--monitoring things with the "top" utility, the biggest memory requirement I saw was just a little short of 11GB.

In Fedora Linux, it's easy enough to create temporary additional swap spaces, but I've no idea, if it's not the same, how to do that in other distros.

Anyway, cool stuff, and I'm looking forward to fiddling with it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180306/4189ccbc/attachment.html>


More information about the cfe-dev mailing list