Skip to content

Commit d68facb

Browse files
Adjust how library names are gathered so that linking is done in the correct order.
1 parent d68ccde commit d68facb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

robotpy_build/wrapper.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,17 @@ def _all_library_names(self):
310310
libs = list(
311311
set(self.get_library_names()) | set(self.get_dlopen_library_names())
312312
)
313+
libs = []
314+
[libs.append(lib) for lib in self.get_library_names() if lib not in libs]
315+
[libs.append(lib) for lib in self.get_dlopen_library_names() if lib not in libs]
316+
dep_libs = []
313317
for dep in self.cfg.depends:
314318
pkg = self.pkgcfg.get_pkg(dep)
315319
libnames = pkg.get_library_names()
316320
if libnames:
317-
libs.extend(libnames)
318-
return list(reversed(libs))
321+
[dep_libs.append(lib) for lib in libnames if lib not in libs]
322+
libs.extend(reversed(dep_libs))
323+
return libs
319324

320325
def _all_extra_objects(self):
321326
libs = []

0 commit comments

Comments
 (0)