common: factor -j --nproc to all builds

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-10-23 00:00:02 +00:00
parent 4b99e522dd
commit 3980974e91
10 changed files with 17 additions and 33 deletions

View File

@@ -9,6 +9,7 @@ import distutils.file_util
import glob
import imp
import json
import multiprocessing
import os
import re
import shlex
@@ -136,6 +137,12 @@ def add_build_arguments(parser):
help='Clean the build instead of building.',
action='store_true',
)
parser.add_argument(
'-j', '--nproc',
help='Number of processors to use for the build. Default: use all cores.',
type=int,
default=multiprocessing.cpu_count(),
)
def add_dry_run_argument(parser):
parser.add_argument('--dry-run', default=False, action='store_true', help='''\