Skip to content

Commit 7348b01

Browse files
committed
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
1 parent 73e811a commit 7348b01

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/toolchains/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,16 @@ def get_labels(self):
431431
'FEATURE': self.target.features,
432432
'TOOLCHAIN': toolchain_labels
433433
}
434+
435+
# This is a policy decision and it should /really/ be in the config system
436+
# ATM it's here for backward compatibility
437+
if (("-g" in self.flags['common'] and
438+
"-O0") in self.flags['common'] or
439+
("-r" in self.flags['common'] and
440+
"-On" in self.flags['common'])):
441+
self.labels['TARGET'].append("DEBUG")
442+
else:
443+
self.labels['TARGET'].append("RELEASE")
434444
return self.labels
435445

436446

0 commit comments

Comments
 (0)