summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes-recipe/cargo.bbclass4
-rw-r--r--meta/classes-recipe/cargo_common.bbclass2
-rw-r--r--meta/classes-recipe/ptest-cargo.bbclass2
3 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass
index 8c0b92df8d..96a74e2ef1 100644
--- a/meta/classes-recipe/cargo.bbclass
+++ b/meta/classes-recipe/cargo.bbclass
@@ -35,7 +35,7 @@ export RUST_BACKTRACE = "1"
35CARGO_SRC_DIR ??= "" 35CARGO_SRC_DIR ??= ""
36 36
37# The actual path to the Cargo.toml 37# The actual path to the Cargo.toml
38MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" 38CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml"
39 39
40RUSTFLAGS ??= "" 40RUSTFLAGS ??= ""
41BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" 41BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}"
@@ -44,7 +44,7 @@ BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}"
44# and will require an up to date Cargo.lock file. 44# and will require an up to date Cargo.lock file.
45# This force the package being built to already ship a Cargo.lock, in the end 45# This force the package being built to already ship a Cargo.lock, in the end
46# this is what we want, at least, for reproducibility of the build. 46# this is what we want, at least, for reproducibility of the build.
47CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" 47CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${CARGO_MANIFEST_PATH}"
48 48
49# This is based on the content of CARGO_BUILD_FLAGS and generally will need to 49# This is based on the content of CARGO_BUILD_FLAGS and generally will need to
50# change if CARGO_BUILD_FLAGS changes. 50# change if CARGO_BUILD_FLAGS changes.
diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass
index b732a1bd95..bf298e96c7 100644
--- a/meta/classes-recipe/cargo_common.bbclass
+++ b/meta/classes-recipe/cargo_common.bbclass
@@ -161,7 +161,7 @@ python cargo_common_do_patch_paths() {
161 # here is better than letting cargo tell (in case the file is missing) 161 # here is better than letting cargo tell (in case the file is missing)
162 # "Cargo.lock should be modified but --frozen was given" 162 # "Cargo.lock should be modified but --frozen was given"
163 163
164 manifest_path = d.getVar("MANIFEST_PATH", True) 164 manifest_path = d.getVar("CARGO_MANIFEST_PATH", True)
165 lockfile = os.path.join(os.path.dirname(manifest_path), "Cargo.lock") 165 lockfile = os.path.join(os.path.dirname(manifest_path), "Cargo.lock")
166 if not os.path.exists(lockfile): 166 if not os.path.exists(lockfile):
167 bb.fatal(f"{lockfile} file doesn't exist") 167 bb.fatal(f"{lockfile} file doesn't exist")
diff --git a/meta/classes-recipe/ptest-cargo.bbclass b/meta/classes-recipe/ptest-cargo.bbclass
index ff57be8525..c46df362bf 100644
--- a/meta/classes-recipe/ptest-cargo.bbclass
+++ b/meta/classes-recipe/ptest-cargo.bbclass
@@ -15,7 +15,7 @@ python do_compile_ptest_cargo() {
15 cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO", True)) 15 cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO", True))
16 cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS", True) 16 cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS", True)
17 rust_flags = d.getVar("RUSTFLAGS", True) 17 rust_flags = d.getVar("RUSTFLAGS", True)
18 manifest_path = d.getVar("MANIFEST_PATH", True) 18 manifest_path = d.getVar("CARGO_MANIFEST_PATH", True)
19 project_manifest_path = os.path.normpath(manifest_path) 19 project_manifest_path = os.path.normpath(manifest_path)
20 manifest_dir = os.path.dirname(manifest_path) 20 manifest_dir = os.path.dirname(manifest_path)
21 21