While the default of using -j=#cores makes sense in most cases, it would be nice if there was a way to specify a higher default inside of a build.ninja file. This makes it easier to use distributed compilation because the capacity of the cluster could be set in the generator script and users won't need to remember to use -j=BIG_NUMBER, or update it as the cluster changes size. Of course, an explicitly set -j on the command line would override the default.
I think there are two natural syntaxes for this, a magic variable like default_jobs = 400 or a magic pool like:
pool default:
depth = 400
The latter seems like a good combination with #1351 (sub-pools) since it would be as-if all pools and rules have a default pool = default variable unless they they specify a different pool explicitly.
While the default of using -j=#cores makes sense in most cases, it would be nice if there was a way to specify a higher default inside of a build.ninja file. This makes it easier to use distributed compilation because the capacity of the cluster could be set in the generator script and users won't need to remember to use -j=BIG_NUMBER, or update it as the cluster changes size. Of course, an explicitly set -j on the command line would override the default.
I think there are two natural syntaxes for this, a magic variable like
default_jobs = 400
or a magic pool like:The latter seems like a good combination with #1351 (sub-pools) since it would be as-if all pools and rules have a default
pool = default
variable unless they they specify a different pool explicitly.