Skip to content

Commit

Permalink
[buck2][rust] prelude: Empty SharedLibraryInfo for prebuilt Rust li…
Browse files Browse the repository at this point in the history
…braries

Summary: Explained in a comment

Test Plan: CI

Reviewed By: dtolnay

Differential Revision: D51290298

fbshipit-source-id: ed7fefa21f0cc1228893c785f178d2d452053be1
  • Loading branch information
JakobDegen authored and facebook-github-bot committed Nov 15, 2023
1 parent 16e4fb1 commit 3089bd5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions antlir/antlir2/features/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ def _impl(ctx: AnalysisContext) -> list[Provider]:
link_info = ctx.attrs.lib[RustLinkInfo]
lib_dir_map = {}
for dep in link_info.exported_link_deps:
lib_dir_map.update({
soname: lib.lib.output
for soname, lib in dep[SharedLibraryInfo].set.value.libraries.items()
})
if dep[SharedLibraryInfo].set:
lib_dir_map.update({
soname: lib.lib.output
for soname, lib in dep[SharedLibraryInfo].set.value.libraries.items()
})

ctx.actions.copied_dir(lib_dir, lib_dir_map)

Expand Down

0 comments on commit 3089bd5

Please sign in to comment.