diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2023-12-08 12:00:26 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-09 19:17:11 +0000 |
commit | 43df94f7af8422ebd1f2884992349ff1baae232b (patch) | |
tree | 1f227af30b9660ecfa524e9f6b2c869b0c662045 | |
parent | db73316fea6b4791cdd7064c7b0ccc5b777212ca (diff) | |
download | poky-43df94f7af8422ebd1f2884992349ff1baae232b.tar.gz |
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 <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-recipe/cargo.bbclass | 7 | ||||
-rw-r--r-- | meta/classes-recipe/cargo_common.bbclass | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 96a74e2ef1..0829a58dd9 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass | |||
@@ -30,13 +30,6 @@ B = "${WORKDIR}/build" | |||
30 | # where the issue occured | 30 | # where the issue occured |
31 | export RUST_BACKTRACE = "1" | 31 | export RUST_BACKTRACE = "1" |
32 | 32 | ||
33 | # The directory of the Cargo.toml relative to the root directory, per default | ||
34 | # assume there's a Cargo.toml directly in the root directory | ||
35 | CARGO_SRC_DIR ??= "" | ||
36 | |||
37 | # The actual path to the Cargo.toml | ||
38 | CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" | ||
39 | |||
40 | RUSTFLAGS ??= "" | 33 | RUSTFLAGS ??= "" |
41 | BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" | 34 | BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" |
42 | # --frozen flag will prevent network access (which is required since only | 35 | # --frozen flag will prevent network access (which is required since only |
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" | |||
33 | # Used by libstd-rs to point to the vendor dir included in rustc src | 33 | # Used by libstd-rs to point to the vendor dir included in rustc src |
34 | CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake" | 34 | CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake" |
35 | 35 | ||
36 | # The directory of the Cargo.toml relative to the root directory, per default | ||
37 | # assume there's a Cargo.toml directly in the root directory | ||
38 | CARGO_SRC_DIR ??= "" | ||
39 | |||
40 | # The actual path to the Cargo.toml | ||
41 | CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" | ||
42 | |||
36 | CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}" | 43 | CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}" |
37 | cargo_common_do_configure () { | 44 | cargo_common_do_configure () { |
38 | mkdir -p ${CARGO_HOME}/bitbake | 45 | mkdir -p ${CARGO_HOME}/bitbake |