rust: read build path from {HOST_}MAKE_PATH

Allow set build path by `{HOST_}MAKE_PATH`.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2025-08-20 17:44:57 +08:00
committed by Tianling Shen
parent 1000e99185
commit 84cb850b7f
2 changed files with 2 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ define Host/Compile/Cargo
--profile $(CARGO_HOST_PROFILE) \ --profile $(CARGO_HOST_PROFILE) \
$(if $(RUST_HOST_FEATURES),--features "$(RUST_HOST_FEATURES)") \ $(if $(RUST_HOST_FEATURES),--features "$(RUST_HOST_FEATURES)") \
--root $(HOST_INSTALL_DIR) \ --root $(HOST_INSTALL_DIR) \
--path "$(HOST_BUILD_DIR)/$(if $(strip $(1)),$(strip $(1)))" \ --path "$(HOST_BUILD_DIR)/$(if $(strip $(1)),$(strip $(1)),$(strip $(HOST_MAKE_PATH)))" \
$(if $(filter --jobserver%,$(HOST_JOBS)),,-j1) \ $(if $(filter --jobserver%,$(HOST_JOBS)),,-j1) \
$(CARGO_HOST_ARGS) \ $(CARGO_HOST_ARGS) \
$(2) $(2)

View File

@@ -45,7 +45,7 @@ define Build/Compile/Cargo
--profile $(CARGO_PKG_PROFILE) \ --profile $(CARGO_PKG_PROFILE) \
$(if $(strip $(RUST_PKG_FEATURES)),--features "$(strip $(RUST_PKG_FEATURES))") \ $(if $(strip $(RUST_PKG_FEATURES)),--features "$(strip $(RUST_PKG_FEATURES))") \
--root $(PKG_INSTALL_DIR) \ --root $(PKG_INSTALL_DIR) \
--path "$(PKG_BUILD_DIR)/$(if $(strip $(1)),$(strip $(1)))" \ --path "$(PKG_BUILD_DIR)/$(if $(strip $(1)),$(strip $(1)),$(strip $(MAKE_PATH)))" \
$(if $(filter --jobserver%,$(PKG_JOBS)),,-j1) \ $(if $(filter --jobserver%,$(PKG_JOBS)),,-j1) \
$(CARGO_PKG_ARGS) \ $(CARGO_PKG_ARGS) \
$(2) $(2)