From 79ee1b8e021f4f730a69a2db37e83a5f800799de Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Mon, 30 Jul 2018 09:17:53 -0500 Subject: [PATCH] Add "components" --- tools/resources/__init__.py | 4 +++- tools/targets/__init__.py | 2 +- tools/toolchains/__init__.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/resources/__init__.py b/tools/resources/__init__.py index 79ec719ad9..4668dd175e 100644 --- a/tools/resources/__init__.py +++ b/tools/resources/__init__.py @@ -135,7 +135,9 @@ class Resources(object): # Incremental scan related self._label_paths = [] - self._labels = {"TARGET": [], "TOOLCHAIN": [], "FEATURE": []} + self._labels = { + "TARGET": [], "TOOLCHAIN": [], "FEATURE": [], "COMPONENT": [] + } self._prefixed_labels = set() # Path seperator style (defaults to OS-specific seperator) diff --git a/tools/targets/__init__.py b/tools/targets/__init__.py index 594381cc07..67ed83d0f6 100644 --- a/tools/targets/__init__.py +++ b/tools/targets/__init__.py @@ -91,7 +91,7 @@ def cached(func): # Cumulative attributes can have values appended to them, so they # need to be computed differently than regular attributes -CUMULATIVE_ATTRIBUTES = ['extra_labels', 'macros', 'device_has', 'features'] +CUMULATIVE_ATTRIBUTES = ['extra_labels', 'macros', 'device_has', 'features', 'components'] def get_resolution_order(json_data, target_name, order, level=0): diff --git a/tools/toolchains/__init__.py b/tools/toolchains/__init__.py index bdde695aef..f3bf72f837 100644 --- a/tools/toolchains/__init__.py +++ b/tools/toolchains/__init__.py @@ -224,6 +224,7 @@ class mbedToolchain: self.labels = { 'TARGET': self.target.labels, 'FEATURE': self.target.features, + 'COMPONENT': self.target.components, 'TOOLCHAIN': toolchain_labels }