It depends on your linker. By default, Firefox appears to use the LLD linker. There is a faster one available, which runs perfectly fine on my 16GB machine: https://github.com/rui314/mold. After installing, it can be enabled by setting —enable-linker=mold instead of —enable-linker=lld