@@ -82,7 +82,6 @@ def generate(self):
82
82
for lib in self .libraries :
83
83
l , _ = splitext (basename (lib ))
84
84
libraries .append (l [3 :])
85
- self .libraries = libraries
86
85
87
86
self .system_libraries = [
88
87
'stdc++' , 'supc++' , 'm' , 'c' , 'gcc' , 'nosys'
@@ -156,7 +155,7 @@ def generate(self):
156
155
else :
157
156
opts ['parent_id' ] = 'release'
158
157
159
- self .process_options (opts , flags )
158
+ self .process_options (opts , flags , libraries )
160
159
161
160
opts ['as' ]['defines' ] = self .as_defines
162
161
opts ['c' ]['defines' ] = self .c_defines
@@ -171,7 +170,7 @@ def generate(self):
171
170
self .filter_dot (s ) for s in self .resources .lib_dirs ]
172
171
173
172
opts ['ld' ]['object_files' ] = objects
174
- opts ['ld' ]['user_libraries' ] = self . libraries
173
+ opts ['ld' ]['user_libraries' ] = libraries
175
174
opts ['ld' ]['system_libraries' ] = self .system_libraries
176
175
opts ['ld' ]['script' ] = "linker-script-%s.ld" % id
177
176
opts ['cpp_cmd' ] = " " .join (toolchain .preproc )
@@ -305,7 +304,7 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
305
304
306
305
# -------------------------------------------------------------------------
307
306
308
- def process_options (self , opts , flags_in ):
307
+ def process_options (self , opts , flags_in , libraries ):
309
308
"""
310
309
CDT managed projects store lots of build options in separate
311
310
variables, with separate IDs in the .cproject file.
@@ -701,7 +700,7 @@ def process_options(self, opts, flags_in):
701
700
opts ['ld' ][
702
701
'other' ] += ' ' .join ('-l' + s for s in self .system_libraries ) + ' '
703
702
opts ['ld' ][
704
- 'other' ] += ' ' .join ('-l' + s for s in self . libraries )
703
+ 'other' ] += ' ' .join ('-l' + s for s in libraries )
705
704
opts ['ld' ]['other' ] += ' -Wl,--end-group '
706
705
707
706
# Strip all 'other' flags, since they might have leading spaces.
0 commit comments