summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/rust-cross.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-23 12:08:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-28 11:07:33 +0100
commit97e267f6df6063e1f02a31c68e9f8b0a6dbe2d98 (patch)
tree6120c4a69dc1e25f29a36cadcfe51478e4769c4c /meta/recipes-devtools/rust/rust-cross.inc
parent1900f5b6078c7ca25c208d1c8230e3074c28425d (diff)
downloadpoky-97e267f6df6063e1f02a31c68e9f8b0a6dbe2d98.tar.gz
rust-cross: Simplfy the rust_gen_target calls
Match the code in rust-cross-canadian so that further simplifications can be considered in future. (From OE-Core rev: 5cb62d0a33777cb9afb1eea5f736a2580ce50dc7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/rust-cross.inc')
-rw-r--r--meta/recipes-devtools/rust/rust-cross.inc16
1 files changed, 4 insertions, 12 deletions
diff --git a/meta/recipes-devtools/rust/rust-cross.inc b/meta/recipes-devtools/rust/rust-cross.inc
index 4c026b1f38..2e47a3aa5f 100644
--- a/meta/recipes-devtools/rust/rust-cross.inc
+++ b/meta/recipes-devtools/rust/rust-cross.inc
@@ -1,17 +1,9 @@
1python do_rust_gen_targets () { 1python do_rust_gen_targets () {
2 wd = d.getVar('WORKDIR') + '/targets/' 2 wd = d.getVar('WORKDIR') + '/targets/'
3 # It is important 'TARGET' is last here so that it overrides our less 3 # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last
4 # informed choices for BUILD & HOST if TARGET happens to be the same as 4 rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH'))
5 # either of them. 5 rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
6 for thing in ['BUILD', 'HOST', 'TARGET']: 6 rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
7 bb.debug(1, "rust_gen_target for " + thing)
8 features = ""
9 cpu = "generic"
10 arch = d.getVar('{}_ARCH'.format(thing))
11 if thing is "TARGET":
12 features = d.getVar('TARGET_LLVM_FEATURES') or ""
13 cpu = d.getVar('TARGET_LLVM_CPU')
14 rust_gen_target(d, thing, wd, features, cpu, arch)
15} 7}
16 8
17# Otherwise we'll depend on what we provide 9# Otherwise we'll depend on what we provide