Skip to content

Commit 6f96d01

Browse files
committed
get_mbed_official_release respects supported_toolchains
1 parent ddaab1b commit 6f96d01

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

tools/build_api.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -364,13 +364,16 @@ def transform_release_toolchains(target, version):
364364
RELEASE_VERSIONS
365365
"""
366366
if int(target.build_tools_metadata["version"]) > 0:
367-
if version == '5':
368-
if 'ARMC5' in target.supported_toolchains:
369-
return ['ARMC5', 'GCC_ARM', 'IAR']
370-
else:
371-
return ['ARM', 'ARMC6', 'GCC_ARM', 'IAR']
372-
else:
373-
return target.supported_toolchains
367+
if version == '5' and 'ARM' in target.supported_toolchains:
368+
non_arm_toolchains = set(["IAR", "GCC_ARM"])
369+
result = ["ARMC5", "ARMC6"]
370+
result.extend(
371+
set(target.supported_toolchains).intersection(
372+
non_arm_toolchains
373+
)
374+
)
375+
return result
376+
return target.supported_toolchains
374377
else:
375378
if version == '5':
376379
return ['ARM', 'GCC_ARM', 'IAR']

0 commit comments

Comments
 (0)