diff --git a/mk/spksrc.cross-rust.mk b/mk/spksrc.cross-rust.mk index 73c9e2158850..4314eb1b805a 100644 --- a/mk/spksrc.cross-rust.mk +++ b/mk/spksrc.cross-rust.mk @@ -53,14 +53,15 @@ endif CARGO_INSTALL_ARGS += --path $(RUST_SRC_DIR) CARGO_INSTALL_ARGS += --root $(STAGING_INSTALL_PREFIX) -ifeq ($(strip $(CARGO_BUILD_ARGS)),) -CARGO_BUILD_ARGS = +# Append additional install options if present +ifneq ($(strip $(CARGO_BUILD_ARGS)),) +CARGO_INSTALL_ARGS += CARGO_BUILD_ARGS endif # Default build with rust and install with cargo rust_install_target: @echo " ==> Cargo install rust package $(PKG_NAME) ($(shell rustc --version); $(RUST_TOOLCHAIN))" - @$(RUN) cargo +$(RUST_TOOLCHAIN) install $(CARGO_INSTALL_ARGS) $(CARGO_BUILD_ARGS) + @$(RUN) cargo +$(RUST_TOOLCHAIN) install $(CARGO_INSTALL_ARGS) #####