'cargo install' only installs executables and examples into the system,
and we should follow that. Libraries are vendored into
build trees from the crate registry and then baked directly into executables.
Neverthless, there's now a condition variable, so individual recipes can
opt into installing libraries if there's a use case for it.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
for tgt in "${B}/target/${CARGO_TARGET_SUBDIR}/"*; do
case $tgt in
*.so|*.rlib)
- install -d "${D}${rustlibdir}"
- install -m755 "$tgt" "${D}${rustlibdir}"
- have_installed=true
+ if [ -n "${CARGO_INSTALL_LIBRARIES}" ]; then
+ install -d "${D}${rustlibdir}"
+ install -m755 "$tgt" "${D}${rustlibdir}"
+ have_installed=true
+ fi
;;
*examples)
if [ -d "$tgt" ]; then