Merge pull request #196 from srwalter/devtool
cargo_common.bbclass: improve operation with devtool
This commit is contained in:
@@ -21,7 +21,7 @@ export CARGO_HOME = "${WORKDIR}/cargo_home"
|
|||||||
export PKG_CONFIG_ALLOW_CROSS = "1"
|
export PKG_CONFIG_ALLOW_CROSS = "1"
|
||||||
|
|
||||||
cargo_common_do_configure () {
|
cargo_common_do_configure () {
|
||||||
mkdir -p ${CARGO_HOME}
|
mkdir -p ${CARGO_HOME}/bitbake
|
||||||
echo "paths = [" > ${CARGO_HOME}/config
|
echo "paths = [" > ${CARGO_HOME}/config
|
||||||
|
|
||||||
for p in ${EXTRA_OECARGO_PATHS}; do
|
for p in ${EXTRA_OECARGO_PATHS}; do
|
||||||
@@ -33,12 +33,16 @@ cargo_common_do_configure () {
|
|||||||
cat <<- EOF >> ${CARGO_HOME}/config
|
cat <<- EOF >> ${CARGO_HOME}/config
|
||||||
[source.bitbake]
|
[source.bitbake]
|
||||||
directory = "${CARGO_HOME}/bitbake"
|
directory = "${CARGO_HOME}/bitbake"
|
||||||
|
|
||||||
[source.crates-io]
|
|
||||||
replace-with = "bitbake"
|
|
||||||
local-registry = "/nonexistant"
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
if [ "${EXTERNALSRC}" == "" ]; then
|
||||||
|
cat <<- EOF >> ${CARGO_HOME}/config
|
||||||
|
[source.crates-io]
|
||||||
|
replace-with = "bitbake"
|
||||||
|
local-registry = "/nonexistant"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
echo "[target.${HOST_SYS}]" >> ${CARGO_HOME}/config
|
echo "[target.${HOST_SYS}]" >> ${CARGO_HOME}/config
|
||||||
echo "linker = '${RUST_TARGET_CCLD}'" >> ${CARGO_HOME}/config
|
echo "linker = '${RUST_TARGET_CCLD}'" >> ${CARGO_HOME}/config
|
||||||
if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then
|
if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user