Skip to content

Commit bafced4

Browse files
committed
Correct check for in-template flags
It was named and used as if it were positive logic, and written with negative logic. This changes the name and usage to negative logic.
1 parent fa1bf57 commit bafced4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/export/uvision/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,14 @@ def format_flags(self):
164164
",".join(filter(lambda f: f.startswith("-D"), flags['asm_flags'])))
165165
flags['asm_flags'] = asm_flag_string
166166

167+
config_option = self.toolchain.get_config_option(
168+
self.toolchain.get_config_header())
167169
c_flags = set(
168170
flags['c_flags'] + flags['cxx_flags'] + flags['common_flags']
169171
)
170172
in_template = set(
171-
["--no_vla", "--cpp", "--c99", "-std=gnu99", "-std=g++98"]
173+
["--no_vla", "--cpp", "--c99", "-std=gnu99", "-std=g++98"] +
174+
config_option
172175
)
173176

174177
def valid_flag(x):
@@ -179,6 +182,8 @@ def is_define(s):
179182

180183
flags['c_flags'] = " ".join(f.replace('"', '\\"') for f in c_flags
181184
if (valid_flag(f) and not is_define(f)))
185+
flags['c_flags'] += " "
186+
flags['c_flags'] += " ".join(config_option)
182187
flags['c_defines'] = " ".join(f[2:] for f in c_flags if is_define(f))
183188
flags['ld_flags'] = " ".join(set(flags['ld_flags']))
184189
return flags

0 commit comments

Comments
 (0)