@@ -349,7 +349,7 @@ def status(message):
349349 return results
350350
351351
352- def compile_repos (config , toolchains , targets , profile , verbose , examples ):
352+ def compile_repos (config , toolchains , targets , profile , verbose , examples , jobs = 0 ):
353353 """Compiles combinations of example programs, targets and compile chains.
354354
355355 The results are returned in a [key: value] dictionary format:
@@ -367,7 +367,11 @@ def compile_repos(config, toolchains, targets, profile, verbose, examples):
367367 Args:
368368 config - the json object imported from the file.
369369 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
371375
372376 """
373377 results = {}
@@ -398,7 +402,7 @@ def compile_repos(config, toolchains, targets, profile, verbose, examples):
398402 valid_choices (example ['toolchains' ], toolchains ),
399403 example ['features' ]):
400404
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 [])
402406 if profile :
403407 build_command .append ("--profile" )
404408 build_command .append (profile )
0 commit comments