@@ -314,7 +314,7 @@ def status(message):
314
314
return results
315
315
316
316
317
- def compile_repos (config , toolchains , targets , examples ):
317
+ def compile_repos (config , toolchains , targets , profile , examples ):
318
318
"""Compiles combinations of example programs, targets and compile chains.
319
319
320
320
The results are returned in a [key: value] dictionary format:
@@ -358,8 +358,14 @@ def compile_repos(config, toolchains, targets, examples):
358
358
valid_choices (example ['toolchains' ], toolchains ),
359
359
example ['features' ]):
360
360
print ("Compiling %s for %s, %s" % (name , target , toolchain ))
361
- proc = subprocess .Popen (["mbed-cli" , "compile" , "-t" , toolchain ,
362
- "-m" , target , "-v" ])
361
+ build_command = ["mbed-cli" , "compile" , "-t" , toolchain , "-m" , target , "-v" ]
362
+
363
+ if profile :
364
+ build_command .append ("--profile" )
365
+ build_command .append (profile )
366
+
367
+ proc = subprocess .Popen (build_command )
368
+
363
369
proc .wait ()
364
370
example_summary = "{} {} {}" .format (name , target , toolchain )
365
371
if proc .returncode :
0 commit comments