Skip to content

Commit 39699d5

Browse files
authored
Merge pull request #10398 from bridadan/official_release_changes
Clean up ARM toolchains from get_mbed_official_release()
2 parents 6d1b759 + ee174fa commit 39699d5

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

tools/build_api.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from os.path import join, exists, dirname, basename, abspath, normpath, splitext
2727
from os.path import relpath
2828
from os import linesep, remove, makedirs
29+
from copy import copy
2930
from time import time
3031
from json import load, dump
3132
from jinja2 import FileSystemLoader
@@ -365,17 +366,13 @@ def transform_release_toolchains(target, version):
365366
"""
366367
if int(target.build_tools_metadata["version"]) > 0:
367368
if version == '5':
368-
non_arm_toolchains = set(["IAR", "GCC_ARM"])
369-
if 'ARMC5' in target.supported_toolchains:
370-
result = ["ARMC5"]
371-
else:
372-
result = ["ARM", "ARMC6"]
373-
result.extend(
374-
set(target.supported_toolchains).intersection(
375-
non_arm_toolchains
376-
)
377-
)
378-
return result
369+
toolchains = copy(target.supported_toolchains)
370+
371+
if "ARM" in toolchains:
372+
toolchains.remove("ARM")
373+
toolchains.extend(["ARMC5", "ARMC6"])
374+
375+
return toolchains
379376
return target.supported_toolchains
380377
else:
381378
if version == '5':

0 commit comments

Comments
 (0)