Merge pull request #6512 from theotherjimmy/export-check-rtos

Move Mbed 5 support check so that it affects the exporters
pull/6530/head
Cruz Monrreal 2018-04-03 11:06:55 -05:00 committed by GitHub
commit 4a5ac149ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -486,11 +486,6 @@ def scan_resources(src_paths, toolchain, dependencies_paths=None,
# Set the toolchain's configuration data
toolchain.set_config_data(toolchain.config.get_config_data())
if (hasattr(toolchain.target, "release_versions") and
"5" not in toolchain.target.release_versions and
"rtos" in toolchain.config.lib_config_data):
raise NotSupportedException("Target does not support mbed OS 5")
return resources
def build_project(src_paths, build_path, target, toolchain_name,

View File

@ -30,7 +30,8 @@ from jinja2 import FileSystemLoader, StrictUndefined
from jinja2.environment import Environment
from jsonschema import Draft4Validator, RefResolver
from ..utils import json_file_to_dict, intelhex_offset, integer
from ..utils import (json_file_to_dict, intelhex_offset, integer,
NotSupportedException)
from ..arm_pack_manager import Cache
from ..targets import (CUMULATIVE_ATTRIBUTES, TARGET_MAP, generate_py_target,
get_resolution_order, Target)
@ -1029,6 +1030,11 @@ class Config(object):
prev_features = features
self.validate_config()
if (hasattr(self.target, "release_versions") and
"5" not in self.target.release_versions and
"rtos" in self.lib_config_data):
raise NotSupportedException("Target does not support mbed OS 5")
return resources
@staticmethod