summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-23 13:48:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-28 11:07:33 +0100
commite75e781a480d37898e8e38dc993dd8daf0dee8b3 (patch)
tree658cc2591914a324cb25d9e13559c2bf30d7727a /meta/recipes-devtools/rust
parent1e04c8aafbe562d2c87ca9de53fbb27703b0c51a (diff)
downloadpoky-e75e781a480d37898e8e38dc993dd8daf0dee8b3.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust')
-rw-r--r--meta/recipes-devtools/rust/rust-cross-canadian-common.inc8
-rw-r--r--meta/recipes-devtools/rust/rust-cross.inc8
2 files changed, 2 insertions, 14 deletions
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
25 -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \ 25 -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
26 " 26 "
27 27
28python do_rust_gen_targets () { 28RUST_TARGETGENS = "BUILD HOST TARGET"
29 wd = d.getVar('WORKDIR') + '/targets/'
30 # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last
31 rust_gen_target(d, 'BUILD', wd, d.getVar('BUILD_ARCH'))
32 rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH'))
33 rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_ARCH'))
34}
35 29
36INHIBIT_DEFAULT_RUST_DEPS = "1" 30INHIBIT_DEFAULT_RUST_DEPS = "1"
37 31
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 @@
1python do_rust_gen_targets () { 1RUST_TARGETGENS = "BUILD HOST TARGET"
2 wd = d.getVar('WORKDIR') + '/targets/'
3 # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last
4 rust_gen_target(d, 'BUILD', wd, d.getVar('BUILD_ARCH'))
5 rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH'))
6 rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_ARCH'))
7}
8 2
9# Otherwise we'll depend on what we provide 3# Otherwise we'll depend on what we provide
10INHIBIT_DEFAULT_RUST_DEPS = "1" 4INHIBIT_DEFAULT_RUST_DEPS = "1"