Merge pull request #5990 from theotherjimmy/fix-sw4stm32-supported

Correct SW4STM32 supported check
pull/5996/head
Cruz Monrreal 2018-02-01 10:30:55 -06:00 committed by GitHub
commit 10c81775b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -20,6 +20,7 @@ from tools.utils import mkdir
from tools.export.gnuarmeclipse import GNUARMEclipse
from tools.export.gnuarmeclipse import UID
from tools.build_api import prepare_toolchain
from tools.targets import TARGET_MAP
from sys import flags, platform
# Global random number generator instance.
@ -281,7 +282,14 @@ class Sw4STM32(GNUARMEclipse):
},
}
TARGETS = BOARDS.keys()
@classmethod
def is_target_supported(cls, target_name):
target = TARGET_MAP[target_name]
target_supported = bool(set(target.resolution_order_names)
.intersection(set(cls.BOARDS.keys())))
toolchain_supported = cls.TOOLCHAIN in target.supported_toolchains
return target_supported and toolchain_supported
def __gen_dir(self, dir_name):
"""