Skip to content

Commit 51276a6

Browse files
theotherjimmyccli8
authored andcommitted
Update compiler check to allow only v6 for OS 5
1 parent 6bf8e19 commit 51276a6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tools/build_api.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,22 +179,22 @@ def is_official_target(target_name, version):
179179

180180
elif version == '5':
181181
# For version 5, ARM, GCC_ARM, and IAR toolchain support is required
182-
required_toolchains = set(['ARM', 'GCC_ARM', 'IAR'])
183-
required_toolchains_sorted = list(required_toolchains)
184-
required_toolchains_sorted.sort()
182+
required_toolchains = [
183+
set(['ARM', 'GCC_ARM', 'IAR']),
184+
set(['ARMC6', 'GCC_ARM', 'IAR'])
185+
]
185186
supported_toolchains = set(target.supported_toolchains)
186-
supported_toolchains_sorted = list(supported_toolchains)
187-
supported_toolchains_sorted.sort()
188187

189-
if not required_toolchains.issubset(supported_toolchains):
188+
if not any(r.issubset(supported_toolchains)
189+
for r in required_toolchains):
190190
result = False
191191
reason = ("Target '%s' must support " % target.name) + \
192192
("ALL of the folowing toolchains to be included in the") + \
193193
((" mbed OS 5.0 official release: %s" + linesep) %
194-
", ".join(required_toolchains_sorted)) + \
194+
", ".join(sorted(required_toolchains[0]))) + \
195195
("Currently it is only configured to support the ") + \
196196
("following toolchains: %s" %
197-
", ".join(supported_toolchains_sorted))
197+
", ".join(sorted(supported_toolchains)))
198198

199199
elif not target.default_lib == 'std':
200200
result = False

0 commit comments

Comments
 (0)