rust: put host build dir to target build dir
authorTianling Shen <cnsztl@immortalwrt.org>
Fri, 21 Jul 2023 19:11:26 +0000 (03:11 +0800)
committerTianling Shen <cnsztl@gmail.com>
Sat, 22 Jul 2023 16:14:49 +0000 (00:14 +0800)
commitefdbac38dc8b649ca26b49fac27abeb5cf76cd28
treea9b77108ecc4e7cbcb5c3ce0fe90f9ed64fb7434
parent6c94d8d06e96d2c7a797e1078d26cfa482e7ad44
rust: put host build dir to target build dir

When user runs `make clean` command, everything in `$(STAGING_DIR)`
(where we installed rust) will be removed, but `$(BUILD_DIR_HOST)`
(where we compiled rust and stored build stage) is untouched.

So when user starts a new build after that, OpenWrt buildroot will
still consider `rust` is installed already, resulting the build error
"cargo: command not found".

Fix this by moving to target build dir as well.

Fixes: f489e019ac4a ("rust: compile host package per target")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
lang/rust/Makefile