Setting number of lit threads with make check


Does anyone know how I can set the number of threads lit uses when invoked by make check? Lit has the —threads argument but this doesn't get set when run through make so it uses the max number of cpus.



make check-all LIT_ARGS="-s -j10"

To limit the threads to 10, for example.


I discovered it's different for cmake builds. You have to use cmake
-DLLVM_LIT_ARGS="..." instead.


What I've seen somewhere and been using is

make check-all 'LIT_ARGS=-v -j4'

I think that does work reliably since the -v gets passed through, though
I've never checked that the 4 processes I see aren't because I've got a 4
core machine rather than due to the -j4...

Hope this helps,