@@ -349,7 +349,7 @@ def status(message):
349
349
return results
350
350
351
351
352
- def compile_repos (config , toolchains , targets , profile , verbose , examples ):
352
+ def compile_repos (config , toolchains , targets , profile , verbose , examples , jobs = 0 ):
353
353
"""Compiles combinations of example programs, targets and compile chains.
354
354
355
355
The results are returned in a [key: value] dictionary format:
@@ -367,7 +367,11 @@ def compile_repos(config, toolchains, targets, profile, verbose, examples):
367
367
Args:
368
368
config - the json object imported from the file.
369
369
toolchains - List of toolchains to compile for.
370
- results - results of the compilation stage.
370
+ targets - list of target names
371
+ profile - build profile path or name if in default place
372
+ verbose - enabling verbose
373
+ examples - List of examples to be build
374
+ jobs - Number of compile jobs
371
375
372
376
"""
373
377
results = {}
@@ -398,7 +402,7 @@ def compile_repos(config, toolchains, targets, profile, verbose, examples):
398
402
valid_choices (example ['toolchains' ], toolchains ),
399
403
example ['features' ]):
400
404
401
- build_command = ["mbed-cli" , "compile" , "-t" , toolchain , "-m" , target ] + (['-vv' ] if verbose else [])
405
+ build_command = ["mbed-cli" , "compile" , "-t" , toolchain , "-m" , target , "-j" , str ( jobs ) ] + (['-vv' ] if verbose else [])
402
406
if profile :
403
407
build_command .append ("--profile" )
404
408
build_command .append (profile )
0 commit comments