File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -124,8 +124,15 @@ def generate(self):
124
124
ctx .update (self .format_flags ())
125
125
126
126
# Add the virtual path the the include option in the ASM flags
127
- ctx ['asm_flags' ] = map (lambda item : "-I" + ctx ['vpath' ][0 ] + "/" + item [2 :]
128
- if item .startswith ('-I' ) else item , ctx ['asm_flags' ])
127
+ new_asm_flags = []
128
+ for flag in ctx ['asm_flags' ]:
129
+ if flag .startswith ('-I' ):
130
+ new_asm_flags .append ("-I{}/{}" .format (ctx ['vpath' ][0 ], flag [2 :]))
131
+ elif flag .startswith ('--preinclude=' ):
132
+ new_asm_flags .append ("--preinclude={}/{}" .format (ctx ['vpath' ][0 ], flag [13 :]))
133
+ else :
134
+ new_asm_flags .append (flag )
135
+ ctx ['asm_flags' ] = new_asm_flags
129
136
130
137
for templatefile in \
131
138
['makefile/%s_%s.tmpl' % (self .TEMPLATE ,
@@ -146,7 +153,7 @@ def format_flags(self):
146
153
"""Format toolchain flags for Makefile"""
147
154
flags = {}
148
155
for k , v in self .flags .items ():
149
- if k in ['asm_flags' , ' c_flags' , 'cxx_flags' ]:
156
+ if k in ['c_flags' , 'cxx_flags' ]:
150
157
flags [k ] = map (lambda x : x .replace ('"' , '\\ "' ), v )
151
158
else :
152
159
flags [k ] = v
You can’t perform that action at this time.
0 commit comments