Set proxy in cargo if available

This is needed for cargo to use proxies set by bitbake. It is important
for devtooled builds which does not use vendored sources.
This commit is contained in:
Johan Anderholm committed 2019-01-13 10:45:01 +01:00
1 parent 4110f1d92a
commit 9ecc36acb5
1 file changed
+14
+14
View File
@@ -51,6 +51,20 @@ cargo_common_do_configure () {
EOF
fi
if [ -n "${http_proxy}" ]; then
cat <<- EOF >> ${CARGO_HOME}/config
[http]
proxy = "${http_proxy}"
EOF
fi
if [ -n "${https_proxy}" ]; then
cat <<- EOF >> ${CARGO_HOME}/config
[https]
proxy = "${https_proxy}"
EOF
fi
echo "[target.${HOST_SYS}]" >> ${CARGO_HOME}/config
echo "linker = '${RUST_TARGET_CCLD}'" >> ${CARGO_HOME}/config
if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then