Use lower memory hardware or virtual environment with low memory to trigger
threshing.
I have machines with 1GB ~ 3GB physical memory with 1GB ~ 2 GB swap space and 'make buildworld -j 20 ~ 30' usually trigger enough llvm compilations to run out of memory. I've been using this change for a while and checked the number of OOM kills from /var/log/message.