Skip to content

Commit 82e52d3

Browse files
committed
dist/tools/compile_test: allow specifying toolchain
1 parent d144e51 commit 82e52d3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

dist/tools/compile_test/compile_like_murdock.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ def _modules_packages(app, board, jobs, env, cwd, args):
194194
_print_module_or_pkg_mismatch(app, board, lines, args)
195195

196196

197-
def _build(app, board, jobs, env, cwd, args):
197+
def _build(app, board, toolchain, jobs, env, cwd, args):
198198
cmd = (f'/bin/bash -c "source .murdock; JOBS={jobs} '
199-
f'compile {app} {board}:gnu"')
199+
f'compile {app} {board}:{toolchain}"')
200200
try:
201201
out = __exec_cmd(cmd, shell=True, env=env, cwd=cwd,
202202
stderr=subprocess.STDOUT)
@@ -235,6 +235,8 @@ def main():
235235
parser.add_argument("-a", "--apps", nargs="+",
236236
help=("A list of apps to test on the supported boards."
237237
" If empty we will choose what is tested."))
238+
parser.add_argument("-t", "--toolchain", choices=["gnu", "llvm"], default="gnu",
239+
help=("Toolchain to use"))
238240
parser.add_argument("-d", "--dry-run", action="store_true",
239241
help=("Show each of the boards and apps to be compiled"
240242
" without spending super long to compile them"))
@@ -281,7 +283,8 @@ def main():
281283
_modules_packages(app, board, args.jobs, full_env, riot_dir,
282284
args)
283285
else:
284-
_build(app, board, args.jobs, full_env, riot_dir, args)
286+
_build(app, board, args.toolchain, args.jobs, full_env,
287+
riot_dir, args)
285288
elapse_time = datetime.datetime.now() - start_time
286289
_end(elapse_time.total_seconds(), args.jobs)
287290

0 commit comments

Comments
 (0)