rules_rust/test/cc_shared_library
Ed Schouten 9d34479407
Ensure dynamic library dependencies end up in the runfiles directory (#2671)
Right now the runfiles directory only contains "data" that is attached
to a rust_binary() or one of its dependencies. This is inconsistent with
cc_binary() and go_binary(), which also include an `_solib_*/` directory
containing shared library dependencies.

When doing a plain 'bazel run' against the resulting executable, this is
not a noticeable issue. The reason being that the runtime dynamic linker
will use `${execroot}/_solib_*`. However, it does become a problem when
`pkg_tar(include_runfiles = True)` is used to construct an archive of
the binary so that it can be placed in a container image.

This change extends the runfiles gathering logic to merge all
LibraryToLink.dynamic_library files in there as well.
2024-06-05 12:20:27 +00:00
..
BUILD.bazel Ensure dynamic library dependencies end up in the runfiles directory (#2671) 2024-06-05 12:20:27 +00:00
lib.c Advertise CcInfo provider on rules (#2126) 2024-01-05 08:31:08 -08:00
lib.h Advertise CcInfo provider on rules (#2126) 2024-01-05 08:31:08 -08:00
lib.rs Advertise CcInfo provider on rules (#2126) 2024-01-05 08:31:08 -08:00
linked_against_shared.rs Ensure dynamic library dependencies end up in the runfiles directory (#2671) 2024-06-05 12:20:27 +00:00
main.c Advertise CcInfo provider on rules (#2126) 2024-01-05 08:31:08 -08:00
runfiles_contains_shared.sh Ensure dynamic library dependencies end up in the runfiles directory (#2671) 2024-06-05 12:20:27 +00:00