Skip to content

Commit b95732a

Browse files
committed
get_mbed_official_release respects supported_toolchains
1 parent 0f1bd76 commit b95732a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tools/build_api.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,18 @@ def transform_release_toolchains(target, version):
365365
"""
366366
if int(target.build_tools_metadata["version"]) > 0:
367367
if version == '5':
368+
non_arm_toolchains = set(["IAR", "GCC_ARM"])
368369
if 'ARMC5' in target.supported_toolchains:
369-
return ['ARMC5', 'GCC_ARM', 'IAR']
370+
result = ["ARMC5"]
370371
else:
371-
return ['ARM', 'ARMC6', 'GCC_ARM', 'IAR']
372-
else:
373-
return target.supported_toolchains
372+
result = ["ARM", "ARMC6"]
373+
result.extend(
374+
set(target.supported_toolchains).intersection(
375+
non_arm_toolchains
376+
)
377+
)
378+
return result
379+
return target.supported_toolchains
374380
else:
375381
if version == '5':
376382
return ['ARM', 'GCC_ARM', 'IAR']

0 commit comments

Comments
 (0)