]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rust-target-config: Create new class to contain target json config generation
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Jul 2022 12:41:38 +0000 (13:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Jul 2022 10:07:11 +0000 (11:07 +0100)
Currently most of the rust recipes use this code but it is all piecemeal.
Turn the code into a class where things can start to be rationalised. Ultimately
some of the data and python code should be moved to a python library but one step
at a time.

No functionality changes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rust-target-config.bbclass [moved from meta/recipes-devtools/rust/rust-common.inc with 99% similarity]
meta/recipes-devtools/cargo/cargo-cross-canadian.inc
meta/recipes-devtools/rust/rust.inc

similarity index 99%
rename from meta/recipes-devtools/rust/rust-common.inc
rename to meta/classes/rust-target-config.bbclass
index 2edc71e0d32bc7f8e9ae983c488c72e98046abc8..4db91d36d53a938eadc92a590519a4b142e5f3da 100644 (file)
@@ -1,4 +1,3 @@
-
 # Right now this is focused on arm-specific tune features.
 # We get away with this for now as one can only use x86-64 as the build host
 # (not arm).
index d12267db3d54080205cd911cd35d1cca11bf828c..e83b6a67b3b86bc87c2b4f0e800e119aee70a78f 100644 (file)
@@ -5,7 +5,7 @@ RUST_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config"
 HOST_SYS = "${HOST_ARCH}-unknown-linux-gnu"
 CARGO_RUST_TARGET_CCLD = "${RUST_BUILD_CCLD}"
 
-require recipes-devtools/rust/rust-common.inc
+inherit rust-target-config
 require cargo.inc
 
 CARGO = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo"
index ea716d31f2c11c9976fac3ee2d3fcf4420169ad2..ecb057ad3b52bb5398e231b9b66e6b9c1293ecc5 100644 (file)
@@ -39,7 +39,7 @@ setup_cargo_environment () {
     printf "linker = '%s'\n" "${RUST_BUILD_CCLD}" >> ${CARGO_HOME}/config
 }
 
-include rust-common.inc
+inherit rust-target-config
 
 do_rust_setup_snapshot () {
     for installer in "${WORKDIR}/rust-snapshot-components/"*"/install.sh"; do