Merge pull request #1888 from sg-/feature-label

Feature label
pull/1890/head
Martin Kojtal 2016-06-09 15:40:46 +01:00
commit 24e767c10f
2 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,7 @@
"is_disk_virtual": false,
"macros": [],
"device_has": [],
"features": [],
"detect_code": [],
"public": false
},

View File

@ -281,6 +281,7 @@ class mbedToolchain:
# 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
@ -314,6 +315,7 @@ class mbedToolchain:
toolchain_labels.remove('mbedToolchain')
self.labels = {
'TARGET': self.target.get_labels(),
'FEATURE': self.target.features,
'TOOLCHAIN': toolchain_labels
}
return self.labels
@ -364,6 +366,7 @@ class mbedToolchain:
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)