openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rust: Remove unneeded RUST_TARGETGENS settings
@ 2022-08-10 22:00 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2022-08-10 22:00 UTC (permalink / raw)
  To: openembedded-core

These match the default from the class so drop them. We then always
generate all targets so remove the configuration from the class.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes-recipe/rust-target-config.bbclass | 8 ++------
 meta/recipes-devtools/cargo/cargo.inc          | 2 --
 meta/recipes-devtools/rust/libstd-rs.inc       | 3 ---
 meta/recipes-devtools/rust/rust.inc            | 2 --
 4 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
index 35d83e0cd26..34050864023 100644
--- a/meta/classes-recipe/rust-target-config.bbclass
+++ b/meta/classes-recipe/rust-target-config.bbclass
@@ -378,16 +378,12 @@ do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH
 RUST_TARGETS_DIR = "${WORKDIR}/rust-targets/"
 export RUST_TARGET_PATH = "${RUST_TARGETS_DIR}"
 
-RUST_TARGETGENS = "BUILD HOST TARGET"
-
 python do_rust_gen_targets () {
     wd = d.getVar('RUST_TARGETS_DIR')
     # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last
     rust_gen_target(d, 'BUILD', wd, d.getVar('BUILD_ARCH'))
-    if "HOST" in d.getVar("RUST_TARGETGENS"):
-        rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH'))
-    if "TARGET" in d.getVar("RUST_TARGETGENS"):
-        rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_ARCH'))
+    rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH'))
+    rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_ARCH'))
 }
 
 addtask rust_gen_targets after do_patch before do_compile
diff --git a/meta/recipes-devtools/cargo/cargo.inc b/meta/recipes-devtools/cargo/cargo.inc
index 636e9c4fe51..40421df4f76 100644
--- a/meta/recipes-devtools/cargo/cargo.inc
+++ b/meta/recipes-devtools/cargo/cargo.inc
@@ -18,8 +18,6 @@ EXCLUDE_FROM_WORLD = "1"
 
 inherit cargo pkgconfig
 
-RUST_TARGETGENS = "BUILD HOST TARGET"
-
 do_cargo_setup_snapshot () {
 	${WORKDIR}/rust-snapshot-components/${CARGO_SNAPSHOT}/install.sh --prefix="${WORKDIR}/${CARGO_SNAPSHOT}" --disable-ldconfig
 	# Need to use uninative's loader if enabled/present since the library paths
diff --git a/meta/recipes-devtools/rust/libstd-rs.inc b/meta/recipes-devtools/rust/libstd-rs.inc
index 1498b88f0e2..d49383ced58 100644
--- a/meta/recipes-devtools/rust/libstd-rs.inc
+++ b/meta/recipes-devtools/rust/libstd-rs.inc
@@ -12,9 +12,6 @@ DEPENDS:append:libc-musl = " libunwind"
 DEPENDS:remove:riscv32 = "libunwind"
 DEPENDS:remove:riscv64 = "libunwind"
 
-
-RUST_TARGETGENS = "BUILD HOST TARGET"
-
 # Embed bitcode in order to allow compiling both with and without LTO
 RUSTFLAGS += "-Cembed-bitcode=yes"
 # Needed so cargo can find libbacktrace
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index 7e302b59929..284347dedc3 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -34,8 +34,6 @@ setup_cargo_environment () {
 
 inherit rust-target-config
 
-RUST_TARGETGENS = "BUILD HOST TARGET"
-
 do_rust_setup_snapshot () {
     for installer in "${WORKDIR}/rust-snapshot-components/"*"/install.sh"; do
         "${installer}" --prefix="${WORKDIR}/rust-snapshot" --disable-ldconfig
-- 
2.34.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-10 22:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-10 22:00 [PATCH] rust: Remove unneeded RUST_TARGETGENS settings Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).