As another example, I can't build crosshatch from scratch without OOM errors, even with 32 GB RAM. The problem is that the build system doesn't avoid scheduling too many memory-hungry jobs in parallel, and LTO of the kernel takes ~40 min to complete on my build system. LTO uses 6GB of RAM, and will still be running when all of the Java and dex2oat jobs want > 2GB each.
Some people swap to zRAM as a workaround, but sometimes the build will complete if you wait for the partial build to fail, and then immediately run 'brunch' a second time.