mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-24 02:35:58 +01:00
common: factor -j --nproc to all builds
This commit is contained in:
@@ -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='''\
|
||||
|
||||
Reference in New Issue
Block a user