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 @@ -126,8 +126,15 @@ def generate(self):
126
126
ctx .update (self .format_flags ())
127
127
128
128
# Add the virtual path the the include option in the ASM flags
129
- ctx ['asm_flags' ] = map (lambda item : "-I" + ctx ['vpath' ][0 ] + "/" + item [2 :]
130
- if item .startswith ('-I' ) else item , ctx ['asm_flags' ])
129
+ new_asm_flags = []
130
+ for flag in ctx ['asm_flags' ]:
131
+ if flag .startswith ('-I' ):
132
+ new_asm_flags .append ("-I{}/{}" .format (ctx ['vpath' ][0 ], flag [2 :]))
133
+ elif flag .startswith ('--preinclude=' ):
134
+ new_asm_flags .append ("--preinclude={}/{}" .format (ctx ['vpath' ][0 ], flag [13 :]))
135
+ else :
136
+ new_asm_flags .append (flag )
137
+ ctx ['asm_flags' ] = new_asm_flags
131
138
132
139
for templatefile in \
133
140
['makefile/%s_%s.tmpl' % (self .TEMPLATE ,
@@ -148,7 +155,7 @@ def format_flags(self):
148
155
"""Format toolchain flags for Makefile"""
149
156
flags = {}
150
157
for k , v in self .flags .items ():
151
- if k in ['asm_flags' , ' c_flags' , 'cxx_flags' ]:
158
+ if k in ['c_flags' , 'cxx_flags' ]:
152
159
flags [k ] = map (lambda x : x .replace ('"' , '\\ "' ), v )
153
160
else :
154
161
flags [k ] = v
You can’t perform that action at this time.
0 commit comments