From e75e781a480d37898e8e38dc993dd8daf0dee8b3 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 23 Jul 2022 13:48:24 +0100 Subject: rust-target-config: Allow the targets generated to be configurable Remove further code duplication by allowing the main function to be configurable. (From OE-Core rev: 2d4b35a0db1220e7a7f1b6776223aa4d40a3f246) Signed-off-by: Richard Purdie --- meta/recipes-devtools/rust/rust-cross-canadian-common.inc | 8 +------- meta/recipes-devtools/rust/rust-cross.inc | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'meta/recipes-devtools/rust') diff --git a/meta/recipes-devtools/rust/rust-cross-canadian-common.inc b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc index 5c0644e92d..34020ff6ff 100644 --- a/meta/recipes-devtools/rust/rust-cross-canadian-common.inc +++ b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc @@ -25,13 +25,7 @@ DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDP -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \ " -python do_rust_gen_targets () { - wd = d.getVar('WORKDIR') + '/targets/' - # 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')) - rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH')) - rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_ARCH')) -} +RUST_TARGETGENS = "BUILD HOST TARGET" INHIBIT_DEFAULT_RUST_DEPS = "1" diff --git a/meta/recipes-devtools/rust/rust-cross.inc b/meta/recipes-devtools/rust/rust-cross.inc index 719857ebbb..ab538e6659 100644 --- a/meta/recipes-devtools/rust/rust-cross.inc +++ b/meta/recipes-devtools/rust/rust-cross.inc @@ -1,10 +1,4 @@ -python do_rust_gen_targets () { - wd = d.getVar('WORKDIR') + '/targets/' - # 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')) - rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH')) - rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_ARCH')) -} +RUST_TARGETGENS = "BUILD HOST TARGET" # Otherwise we'll depend on what we provide INHIBIT_DEFAULT_RUST_DEPS = "1" -- cgit v1.2.3-54-g00ecf