Skip to content

Feature label #1888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hal/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"is_disk_virtual": false,
"macros": [],
"device_has": [],
"features": [],
"detect_code": [],
"public": false
},
Expand Down
3 changes: 3 additions & 0 deletions workspace_tools/toolchains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def get_symbols(self):
# Target and Toolchain symbols
labels = self.get_labels()
self.symbols = ["TARGET_%s" % t for t in labels['TARGET']]
self.symbols.extend(["FEATURE_%s" % t for t in labels['FEATURE']])
self.symbols.extend(["TOOLCHAIN_%s" % t for t in labels['TOOLCHAIN']])

# Config support
Expand Down Expand Up @@ -314,6 +315,7 @@ def get_labels(self):
toolchain_labels.remove('mbedToolchain')
self.labels = {
'TARGET': self.target.get_labels(),
'FEATURE': self.target.features,
'TOOLCHAIN': toolchain_labels
}
return self.labels
Expand Down Expand Up @@ -364,6 +366,7 @@ def scan_resources(self, path):

if ((d.startswith('.') or d in self.legacy_ignore_dirs) or
(d.startswith('TARGET_') and d[7:] not in labels['TARGET']) or
(d.startswith('FEATURE_') and d[8:] not in labels['FEATURE']) or
(d.startswith('TOOLCHAIN_') and d[10:] not in labels['TOOLCHAIN'])):
dirs.remove(d)

Expand Down