backends/backends: recurse when looking for paths in bundled shared libraries
This previously worked because we were accidentally doing this via
mutation. However, doing this via mutation is not a good way to do it,
we should be explicit.
Fixes
@@ -764,6 +764,9 @@ class Backend:
paths.append(os.path.join(self.build_to_src, rel_to_src))
else:
paths.append(libdir)
+ for i in chain(target.link_targets, target.link_whole_targets):
+ if isinstance(i, build.BuildTarget):
+ paths.extend(self.rpaths_for_bundled_shared_libraries(i, exclude_system))
return paths
# This may take other types
