summaryrefslogtreecommitdiffstats
path: root/meta/classes/cargo_common.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/cargo_common.bbclass')
-rw-r--r--meta/classes/cargo_common.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/cargo_common.bbclass b/meta/classes/cargo_common.bbclass
index 90fad75415..c1bc142d85 100644
--- a/meta/classes/cargo_common.bbclass
+++ b/meta/classes/cargo_common.bbclass
@@ -45,12 +45,12 @@ cargo_common_do_configure () {
directory = "${CARGO_VENDORING_DIRECTORY}"
EOF
- if [ -z "${EXTERNALSRC}" ] && [ ${CARGO_DISABLE_BITBAKE_VENDORING} = "0" ]; then
+ if [ ${CARGO_DISABLE_BITBAKE_VENDORING} = "0" ]; then
cat <<- EOF >> ${CARGO_HOME}/config
[source.crates-io]
replace-with = "bitbake"
- local-registry = "/nonexistant"
+ local-registry = "/nonexistent"
EOF
fi
@@ -88,7 +88,7 @@ cargo_common_do_configure () {
cat <<- EOF >> ${CARGO_HOME}/config
[build]
- # Use out of tree build destination to avoid poluting the source tree
+ # Use out of tree build destination to avoid polluting the source tree
target-dir = "${B}/target"
EOF
fi
@@ -101,6 +101,10 @@ cargo_common_do_configure () {
EOF
}
+do_compile:prepend () {
+ oe_cargo_fix_env
+}
+
oe_cargo_fix_env () {
export CC="${RUST_TARGET_CC}"
export CXX="${RUST_TARGET_CXX}"