Merge pull request #9297 from bridadan/fix_os2_tests_uarm

uARM targets now build in correct ARM_MICRO directory
pull/9415/head
Martin Kojtal 2019-01-17 12:40:21 +01:00 committed by GitHub
commit 694e45fb78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 2 deletions

View File

@ -121,6 +121,15 @@ def add_result_to_report(report, result):
result_wrap = {0: result}
report[target][toolchain][id_name].append(result_wrap)
def get_toolchain_name(target, toolchain_name):
if toolchain_name == "ARM":
if CORE_ARCH[target.core] == 8:
return "ARMC6"
elif getattr(target, "default_toolchain", None) == "uARM":
return "uARM"
return toolchain_name
def get_config(src_paths, target, toolchain_name=None, app_config=None):
"""Get the configuration object for a target-toolchain combination
@ -316,8 +325,8 @@ def prepare_toolchain(src_paths, build_dir, target, toolchain_name,
raise NotSupportedException(
"Target {} is not supported by toolchain {}".format(
target.name, toolchain_name))
if (toolchain_name == "ARM" and CORE_ARCH[target.core] == 8):
toolchain_name = "ARMC6"
toolchain_name = get_toolchain_name(target, toolchain_name)
try:
cur_tc = TOOLCHAIN_CLASSES[toolchain_name]
@ -942,6 +951,8 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
Return - True if target + toolchain built correctly, False if not supported
"""
toolchain_name = get_toolchain_name(target, toolchain_name)
if report is not None:
start = time()
id_name = "MBED"