From: Tianling Shen Date: Wed, 20 Aug 2025 09:44:57 +0000 (+0800) Subject: rust: read build path from `{HOST_}MAKE_PATH` X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=a831fb94c8e4ef729f489c1aeb90a5ff2d62d3b6;p=feed%2Fpackages.git rust: read build path from `{HOST_}MAKE_PATH` Allow set build path by `{HOST_}MAKE_PATH`. Signed-off-by: Tianling Shen (cherry picked from commit 84cb850b7f967c2ed7ec4fdb55e8655a245f16dd) --- diff --git a/lang/rust/rust-host-build.mk b/lang/rust/rust-host-build.mk index 35f8fbe0dd..457faf4178 100644 --- a/lang/rust/rust-host-build.mk +++ b/lang/rust/rust-host-build.mk @@ -44,7 +44,7 @@ define Host/Compile/Cargo --profile $(CARGO_HOST_PROFILE) \ $(if $(RUST_HOST_FEATURES),--features "$(RUST_HOST_FEATURES)") \ --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) \ $(CARGO_HOST_ARGS) \ $(2) diff --git a/lang/rust/rust-package.mk b/lang/rust/rust-package.mk index 18370bc35b..57a8ccf4b7 100644 --- a/lang/rust/rust-package.mk +++ b/lang/rust/rust-package.mk @@ -45,7 +45,7 @@ define Build/Compile/Cargo --profile $(CARGO_PKG_PROFILE) \ $(if $(strip $(RUST_PKG_FEATURES)),--features "$(strip $(RUST_PKG_FEATURES))") \ --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) \ $(CARGO_PKG_ARGS) \ $(2)