Skip to content

Commit 8a2836f

Browse files
committed
Fix detection of supported targets for mbed 2 builds
1 parent 801e555 commit 8a2836f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tools/build.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,8 @@ def main():
182182
except NoValidToolchainException as e:
183183
print_end_warnings(e.end_warnings)
184184
args_error(parser, str(e))
185-
186185
tt_id = "%s::%s" % (internal_tc_name, target_name)
187-
if not target_supports_toolchain(target, toolchain):
186+
if not target_supports_toolchain(target, toolchain_name):
188187
# Log this later
189188
print("%s skipped: toolchain not supported" % tt_id)
190189
skipped.append(tt_id)
@@ -196,7 +195,6 @@ def main():
196195
if target.is_PSA_secure_target and \
197196
not is_relative_to_root(options.source_dir):
198197
options.source_dir = ROOT
199-
200198
if options.source_dir:
201199
lib_build_res = build_library(
202200
options.source_dir, options.build_dir, target, toolchain_name,

tools/build_api.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,6 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
988988
#then set the default_toolchain to uARM to link AC6 microlib.
989989
if(selected_toolchain_name == "ARMC6" and toolchain_name == "uARM"):
990990
target.default_toolchain = "uARM"
991-
toolchain_name = selected_toolchain_name
992991

993992
if report is not None:
994993
start = time()
@@ -1003,7 +1002,7 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
10031002
prep_properties(
10041003
properties, target.name, toolchain_name, vendor_label)
10051004

1006-
if toolchain_name not in target.supported_toolchains:
1005+
if not target_supports_toolchain(target, toolchain_name):
10071006
supported_toolchains_text = ", ".join(target.supported_toolchains)
10081007
notify.info('The target {} does not support the toolchain {}'.format(
10091008
target.name,
@@ -1023,14 +1022,16 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
10231022

10241023
try:
10251024
# Source and Build Paths
1025+
10261026
build_toolchain = join(
1027-
MBED_LIBRARIES, mbed2_obj_path(target.name, toolchain_name))
1027+
MBED_LIBRARIES, mbed2_obj_path(target.name, selected_toolchain_name)
1028+
)
10281029
mkdir(build_toolchain)
10291030

10301031
tmp_path = join(
10311032
MBED_LIBRARIES,
10321033
'.temp',
1033-
mbed2_obj_path(target.name, toolchain_name)
1034+
mbed2_obj_path(target.name, selected_toolchain_name)
10341035
)
10351036
mkdir(tmp_path)
10361037

0 commit comments

Comments
 (0)