mirror of https://github.com/bazelbuild/rules_rust
9d34479407
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. |
||
---|---|---|
.. | ||
BUILD.bazel | ||
lib.c | ||
lib.h | ||
lib.rs | ||
linked_against_shared.rs | ||
main.c | ||
runfiles_contains_shared.sh |