Fix "pare error in Defines" uvision error

pull/7569/head
Jimmy Brisson 2018-08-08 09:24:50 -05:00
parent 9f00a9be70
commit 1eb47934eb
1 changed files with 3 additions and 2 deletions

View File

@ -191,11 +191,12 @@ class Uvision(Exporter):
return (
x not in in_template or
not x.startswith("-O") or
not x.startswith("-std")
not x.startswith("-std") or
not x.startswith("-D")
)
def is_define(s):
return s.startswith("-D")
return s.startswith("-D") and "(" not in s
flags['c_flags'] = " ".join(f.replace('"', '\\"') for f in c_flags
if (valid_flag(f) and not is_define(f)))