rust: Move CARGO_HOME to $(DL_DIR)/cargo

As CARGO_HOME mainly functions as a download and source cache[1], moving
it into $(DL_DIR) allows it to persist and be reused between different
buildroots/sdks (when DL_DIR is set to a custom/external location).

[1]: https://doc.rust-lang.org/cargo/guide/cargo-home.html

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To 2023-09-23 00:26:20 +08:00
parent 5c5123f0f6
commit 853c9c9e86
No known key found for this signature in database
GPG Key ID: C616D9E719E868E4
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@
# Rust Environmental Vars
RUSTC_HOST_SUFFIX:=$(word 4, $(subst -, ,$(GNU_HOST_NAME)))
RUSTC_HOST_ARCH:=$(HOST_ARCH)-unknown-linux-$(RUSTC_HOST_SUFFIX)
CARGO_HOME:=$(STAGING_DIR)/host/cargo
CARGO_HOME:=$(DL_DIR)/cargo
CARGO_VARS?=
ifeq ($(CONFIG_USE_MUSL),y)