diff options
author | Alexander Kanavin <alex@linutronix.de> | 2024-12-04 07:48:49 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-05 17:07:10 +0000 |
commit | 003ea0b57379dde766bc727e332b74f00af400bf (patch) | |
tree | c0ad66e670138dce08ea6843d064623a951b5815 /meta/classes-recipe | |
parent | d04c561cf51e14086c0634d8343ac558e143f38b (diff) | |
download | poky-003ea0b57379dde766bc727e332b74f00af400bf.tar.gz |
cargo.bbclass: do not install libraries by default
'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.
(From OE-Core rev: 68990af9630da16fc75362ca09046ceab71a1106)
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>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r-- | meta/classes-recipe/cargo.bbclass | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 0829a58dd9..b583f84bdf 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass | |||
@@ -61,9 +61,11 @@ cargo_do_install () { | |||
61 | for tgt in "${B}/target/${CARGO_TARGET_SUBDIR}/"*; do | 61 | for tgt in "${B}/target/${CARGO_TARGET_SUBDIR}/"*; do |
62 | case $tgt in | 62 | case $tgt in |
63 | *.so|*.rlib) | 63 | *.so|*.rlib) |
64 | install -d "${D}${rustlibdir}" | 64 | if [ -n "${CARGO_INSTALL_LIBRARIES}" ]; then |
65 | install -m755 "$tgt" "${D}${rustlibdir}" | 65 | install -d "${D}${rustlibdir}" |
66 | have_installed=true | 66 | install -m755 "$tgt" "${D}${rustlibdir}" |
67 | have_installed=true | ||
68 | fi | ||
67 | ;; | 69 | ;; |
68 | *examples) | 70 | *examples) |
69 | if [ -d "$tgt" ]; then | 71 | if [ -d "$tgt" ]; then |