nativesdk: Add some tools in a separate recipe (#345)

* nativesdk: Add some tools in a separate recipe

This brings ATM:
- clippy
- rustfmt

Another approach might be to include these into the existing rust recipe,
but as we can't really use PACKAGECONFIG here it might just overload it.
This way, the tools will be built in parallel and still can be excluded
from the packgae group, if desired.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2021-06-05 19:42:18 +02:00
committed by GitHub
parent 494d879a1d
commit ab86e0a068
7 changed files with 116 additions and 163 deletions
+11 -4
View File
@@ -138,6 +138,12 @@ create_wrapper () {
chmod +x "${file}"
}
export WRAPPER_TARGET_CC = "${CC}"
export WRAPPER_TARGET_CXX = "${CXX}"
export WRAPPER_TARGET_CCLD = "${CCLD}"
export WRAPPER_TARGET_LDFLAGS = "${LDFLAGS}"
export WRAPPER_TARGET_AR = "${AR}"
# compiler is used by gcc-rs
# linker is used by rustc/cargo
# archiver is used by the build of libstd-rs
@@ -154,13 +160,14 @@ do_rust_create_wrappers () {
create_wrapper "${RUST_BUILD_AR}" "${BUILD_AR}"
# Yocto Target / Rust Target C compiler
create_wrapper "${RUST_TARGET_CC}" "${CC}"
create_wrapper "${RUST_TARGET_CC}" "${WRAPPER_TARGET_CC}"
# Yocto Target / Rust Target C++ compiler
create_wrapper "${RUST_TARGET_CXX}" "${CXX}"
create_wrapper "${RUST_TARGET_CXX}" "${WRAPPER_TARGET_CXX}"
# Yocto Target / Rust Target linker
create_wrapper "${RUST_TARGET_CCLD}" "${CCLD}" "${LDFLAGS}"
create_wrapper "${RUST_TARGET_CCLD}" "${WRAPPER_TARGET_CCLD}" "${WRAPPER_TARGET_LDFLAGS}"
# Yocto Target / Rust Target archiver
create_wrapper "${RUST_TARGET_AR}" "${AR}"
create_wrapper "${RUST_TARGET_AR}" "${WRAPPER_TARGET_AR}"
}
addtask rust_create_wrappers before do_configure after do_patch