rust: Move cargo config options into environment variables
authorJeffery To <jeffery.to@gmail.com>
Sun, 1 Oct 2023 18:16:22 +0000 (02:16 +0800)
committerJeffery To <jeffery.to@gmail.com>
Wed, 11 Oct 2023 07:50:23 +0000 (15:50 +0800)
commit5c5123f0f63cfda1d4f17a5d315356883fd82923
tree097c5475d8b17040edfa142d9a63ab205ee080f7
parent49aaf19c65a35c37725ead7a438684411b512d6f
rust: Move cargo config options into environment variables

This also:

* Modify the "release" profile in place of adding the "stripped" profile

  Only the profile for target is modified; there are no file size
  constraints for host.

* For host, build with the "release" profile

* For target, build with either the "dev" or "release" profile based on
  CONFIG_DEBUG

There is no environment variable to specify the "strip" option, but
enabling this option is not necessary as the build system will already
strip binaries based on CONFIG_NO_STRIP / CONFIG_USE_STRIP /
CONFIG_USE_SSTRIP.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/rust/Makefile
lang/rust/files/cargo-config [deleted file]
lang/rust/rust-host-build.mk
lang/rust/rust-package.mk
lang/rust/rust-values.mk