diff options
Diffstat (limited to 'meta/classes-recipe/cargo.bbclass')
-rw-r--r-- | meta/classes-recipe/cargo.bbclass | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 0829a58dd9..2dd28e95d3 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass | |||
@@ -42,13 +42,13 @@ CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manif | |||
42 | # This is based on the content of CARGO_BUILD_FLAGS and generally will need to | 42 | # This is based on the content of CARGO_BUILD_FLAGS and generally will need to |
43 | # change if CARGO_BUILD_FLAGS changes. | 43 | # change if CARGO_BUILD_FLAGS changes. |
44 | BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}" | 44 | BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}" |
45 | CARGO_TARGET_SUBDIR="${RUST_HOST_SYS}/${BUILD_DIR}" | 45 | CARGO_TARGET_SUBDIR = "${RUST_HOST_SYS}/${BUILD_DIR}" |
46 | oe_cargo_build () { | 46 | oe_cargo_build () { |
47 | export RUSTFLAGS="${RUSTFLAGS}" | 47 | export RUSTFLAGS="${RUSTFLAGS}" |
48 | bbnote "Using rust targets from ${RUST_TARGET_PATH}" | 48 | bbnote "Using rust targets from ${RUST_TARGET_PATH}" |
49 | bbnote "cargo = $(which ${CARGO})" | 49 | bbnote "cargo = $(which ${CARGO})" |
50 | bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@" | 50 | bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} ${PACKAGECONFIG_CONFARGS} $@" |
51 | "${CARGO}" build ${CARGO_BUILD_FLAGS} "$@" | 51 | "${CARGO}" build ${CARGO_BUILD_FLAGS} ${PACKAGECONFIG_CONFARGS} "$@" |
52 | } | 52 | } |
53 | 53 | ||
54 | do_compile[progress] = "outof:\s+(\d+)/(\d+)" | 54 | do_compile[progress] = "outof:\s+(\d+)/(\d+)" |
@@ -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 |