Add Debug or Release to labels depending on flags

This is a policy decision and it should /really/ be in the config system
ATM it's here for backward compatibility
pull/2802/head
Jimmy Brisson 2016-09-29 14:52:40 -05:00
parent 73e811a9a0
commit 7348b0131b
1 changed files with 10 additions and 0 deletions

View File

@ -431,6 +431,16 @@ class mbedToolchain:
'FEATURE': self.target.features,
'TOOLCHAIN': toolchain_labels
}
# This is a policy decision and it should /really/ be in the config system
# ATM it's here for backward compatibility
if (("-g" in self.flags['common'] and
"-O0") in self.flags['common'] or
("-r" in self.flags['common'] and
"-On" in self.flags['common'])):
self.labels['TARGET'].append("DEBUG")
else:
self.labels['TARGET'].append("RELEASE")
return self.labels