We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 019e3b0 + 3773306 commit 7e87634Copy full SHA for 7e87634
classes/cargo_bin.bbclass
@@ -33,7 +33,17 @@ CARGO_BUILD_PROFILE ?= "release"
33
34
CARGO_INSTALL_DIR ?= "${D}${bindir}"
35
36
-CARGO_BINDIR = "${B}/${RUST_TARGET}/${CARGO_BUILD_PROFILE}"
+def cargo_profile_to_builddir(profile):
37
+ # See https://doc.rust-lang.org/cargo/guide/build-cache.html
38
+ # for the special cases mapped here.
39
+ return {
40
+ 'dev': 'debug',
41
+ 'test': 'debug',
42
+ 'release': 'release',
43
+ 'bench': 'release',
44
+ }.get(profile, profile)
45
+
46
+CARGO_BINDIR = "${B}/${RUST_TARGET}/${@cargo_profile_to_builddir(d.getVar('CARGO_BUILD_PROFILE'))}"
47
WRAPPER_DIR = "${WORKDIR}/wrappers"
48
49
# Set the Cargo manifest path to the typical location
0 commit comments