mirror of https://github.com/ARMmbed/mbed-os.git
Refactor condition check
parent
816516e23c
commit
f5230cd70c
|
@ -233,7 +233,7 @@ def find_valid_toolchain(target, toolchain):
|
|||
toolchain_names = get_valid_toolchain_names(target, toolchain)
|
||||
last_error = None
|
||||
for index, toolchain_name in enumerate(toolchain_names):
|
||||
internal_tc_name = get_toolchain_name(target, toolchain_name)
|
||||
internal_tc_name = get_toolchain_name(target, toolchain_name)
|
||||
if not TOOLCHAIN_CLASSES[internal_tc_name].check_executable():
|
||||
search_path = TOOLCHAIN_PATHS[internal_tc_name] or "No path set"
|
||||
last_error = (
|
||||
|
@ -243,12 +243,9 @@ def find_valid_toolchain(target, toolchain):
|
|||
else:
|
||||
if toolchain_name in ["uARM", "ARMC5", "ARMC6"]:
|
||||
if toolchain_name == "ARMC5":
|
||||
end_warnings.append(ARMC5_MIGRATION_WARNING)
|
||||
if (
|
||||
toolchain_name == "uARM"
|
||||
or target.default_toolchain == "uARM"
|
||||
):
|
||||
end_warnings.append(UARM_TOOLCHAIN_WARNING)
|
||||
end_warnings.append(ARMC5_MIGRATION_WARNING)
|
||||
if "uARM" in {toolchain_name, target.default_toolchain}:
|
||||
end_warnings.append(UARM_TOOLCHAIN_WARNING)
|
||||
return toolchain_name, internal_tc_name, end_warnings
|
||||
else:
|
||||
if last_error:
|
||||
|
|
Loading…
Reference in New Issue