]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common
authorAlex Kiernan <alex.kiernan@gmail.com>
Fri, 8 Dec 2023 12:00:26 +0000 (12:00 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 9 Dec 2023 19:16:35 +0000 (19:16 +0000)
cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on
CARGO_SRC_DIR), but their definition was in cargo.bbclass.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/cargo.bbclass
meta/classes-recipe/cargo_common.bbclass

index 96a74e2ef1ece69346ec14a736e257156446bea6..0829a58dd90f1df9e1038e8f3ad21d0456f9652d 100644 (file)
@@ -30,13 +30,6 @@ B = "${WORKDIR}/build"
 # where the issue occured
 export RUST_BACKTRACE = "1"
 
-# 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"
-
 RUSTFLAGS ??= ""
 BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}"
 # --frozen flag will prevent network access (which is required since only
index bf298e96c7451b24b0bcd755da47875afd16ea76..509aa195c5fa81f6ea9f867fcf2dd13e2ec8dee3 100644 (file)
@@ -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