Limiting the threads as somebody elses said. For chromium no one really builds it on a laptop, everyone in my team used a build server or a 32 core monster desktop.
AFAIK you'd need to limit the compiler threads, and hopefully the linker doesn't run out of memory. 16GiB of memory is really not enough.