Skip to content

Commit 1eaa8a5

Browse files
author
Cruz Monrreal
authored
Merge pull request #7937 from theotherjimmy/fix-mcuxpresso-lib-use
Export, MCUXpresso: Avoid assigning self.libraries
2 parents 43ffe3e + 121130e commit 1eaa8a5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/export/mcuxpresso/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def generate(self):
8282
for lib in self.libraries:
8383
l, _ = splitext(basename(lib))
8484
libraries.append(l[3:])
85-
self.libraries = libraries
8685

8786
self.system_libraries = [
8887
'stdc++', 'supc++', 'm', 'c', 'gcc', 'nosys'
@@ -156,7 +155,7 @@ def generate(self):
156155
else:
157156
opts['parent_id'] = 'release'
158157

159-
self.process_options(opts, flags)
158+
self.process_options(opts, flags, libraries)
160159

161160
opts['as']['defines'] = self.as_defines
162161
opts['c']['defines'] = self.c_defines
@@ -171,7 +170,7 @@ def generate(self):
171170
self.filter_dot(s) for s in self.resources.lib_dirs]
172171

173172
opts['ld']['object_files'] = objects
174-
opts['ld']['user_libraries'] = self.libraries
173+
opts['ld']['user_libraries'] = libraries
175174
opts['ld']['system_libraries'] = self.system_libraries
176175
opts['ld']['script'] = "linker-script-%s.ld" % id
177176
opts['cpp_cmd'] = " ".join(toolchain.preproc)
@@ -305,7 +304,7 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
305304

306305
# -------------------------------------------------------------------------
307306

308-
def process_options(self, opts, flags_in):
307+
def process_options(self, opts, flags_in, libraries):
309308
"""
310309
CDT managed projects store lots of build options in separate
311310
variables, with separate IDs in the .cproject file.
@@ -701,7 +700,7 @@ def process_options(self, opts, flags_in):
701700
opts['ld'][
702701
'other'] += ' '.join('-l' + s for s in self.system_libraries) + ' '
703702
opts['ld'][
704-
'other'] += ' '.join('-l' + s for s in self.libraries)
703+
'other'] += ' '.join('-l' + s for s in libraries)
705704
opts['ld']['other'] += ' -Wl,--end-group '
706705

707706
# Strip all 'other' flags, since they might have leading spaces.

0 commit comments

Comments
 (0)