Hi Michael,

On Wed, 07 Sep 2022 12:41:00 -0500 Michael Catanzaro via webkit-dev 
<webkit-dev@lists.webkit.org> wrote:
> On Sat, May 21 2022 at 09:43:06 AM -0500, Michael Catanzaro 
> <mcatanz...@gnome.org> wrote:
> > I would go even further and consider enabling unified builds only in 
> > DEVELOPER_MODE (for CMake ports). For non-developer builds, 
> > compilation time is much less important than limiting RAM usage to 
> > reasonable levels. Using ninja's default parallelization level, I 
> > recently started hitting OOM failures even on a machine with 64 GB 
> > RAM! We have many people complaining that they cannot build on more 
> > normal machines with 16 GB RAM. If we have an EWS to ensure the 
> > non-unified build actually works, then it should be safe enough to 
> > make it the normal supported path for non-developers, rather than 
> > just a "best effort, let's hope it works today" thing.
> 
> I withdraw this proposal.
> 
> I thought that non-unified builds would significantly reduce peak RAM 
> usage, but I was wrong [...]

The main reason for having working non-unified builds has never been memory
usage. I would expect that with a reasonable linker memory usage is similar
because the amount of code, relocations, symbol resolutions, etc. to handle is
about the same. The main difference is file descriptor usage and that there
will be more debuginfo copies that the linker has to deduplicate in
non-unified mode--some linkers may handle that worse than others.

> [...] In fact, non-unified builds seem to require substantially more RAM at
> link time, perhaps because there are more object files to link together. On
> a desktop with 64 GB of RAM, I'm not able to link a non-unified build
> successfully without running out of RAM, but using a unified build it works
> fine. So my proposal was just totally off base.

My laptop has 20 GiB of memory and a debug build in non-unified mode links
just fine with either LLD or Mold (I haven't used the GNU linker for months).
Something smells fishy with your setup.

Cheers,
—Adrián

Attachment: signature.asc
Description: PGP signature

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to