From 43df94f7af8422ebd1f2884992349ff1baae232b Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Fri, 8 Dec 2023 12:00:26 +0000 Subject: cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on CARGO_SRC_DIR), but their definition was in cargo.bbclass. (From OE-Core rev: 740374a13ad5359767b421666decf50c158ea0df) Signed-off-by: Alex Kiernan Signed-off-by: Richard Purdie --- meta/classes-recipe/cargo_common.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meta/classes-recipe/cargo_common.bbclass') diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index bf298e96c7..509aa195c5 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -33,6 +33,13 @@ CARGO_DISABLE_BITBAKE_VENDORING ?= "0" # Used by libstd-rs to point to the vendor dir included in rustc src CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake" +# The directory of the Cargo.toml relative to the root directory, per default +# assume there's a Cargo.toml directly in the root directory +CARGO_SRC_DIR ??= "" + +# The actual path to the Cargo.toml +CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" + CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}" cargo_common_do_configure () { mkdir -p ${CARGO_HOME}/bitbake -- cgit v1.2.3-54-g00ecf