diff options
Diffstat (limited to 'lang/rust/rust-package.mk')
-rw-r--r-- | lang/rust/rust-package.mk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lang/rust/rust-package.mk b/lang/rust/rust-package.mk index 472417a61..54c2aa89a 100644 --- a/lang/rust/rust-package.mk +++ b/lang/rust/rust-package.mk @@ -7,6 +7,17 @@ include $(rust_mk_path)rust-host.mk # $(1) path to the package # $(2) additional arguments to cargo +define Host/Compile/Cargo + ( \ + cd $(HOST_BUILD_DIR) ; \ + export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \ + CARGO_HOME=$(CARGO_HOME) CC=$(HOSTCC) \ + cargo install -v --profile stripped --root $(HOST_INSTALL_DIR) --path "$(if $(strip $(1)),$(strip $(1)),.)" $(2) ; \ + ) +endef + +# $(1) path to the package +# $(2) additional arguments to cargo define Build/Compile/Cargo ( \ cd $(PKG_BUILD_DIR) ; \ |