rust: read build path from `{HOST_}MAKE_PATH`
authorTianling Shen <[email protected]>
Wed, 20 Aug 2025 09:44:57 +0000 (17:44 +0800)
committerTianling Shen <[email protected]>
Fri, 22 Aug 2025 09:19:18 +0000 (17:19 +0800)
Allow set build path by `{HOST_}MAKE_PATH`.

Signed-off-by: Tianling Shen <[email protected]>
(cherry picked from commit 84cb850b7f967c2ed7ec4fdb55e8655a245f16dd)

lang/rust/rust-host-build.mk
lang/rust/rust-package.mk

index 35f8fbe0ddba6388133843b3ad57e1ea4127316d..457faf417874fcaeb42a66a9b6fc0609c61a4928 100644 (file)
@@ -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)
index 18370bc35bafd27488b00b8f6e56a8302c169d43..57a8ccf4b77bd5007416572191980df5facfc3fc 100644 (file)
@@ -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)