summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-23 11:54:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-23 12:10:32 +0100
commit7181e326f1814cbf8b7960b0d4f02bd3a1ce14f8 (patch)
tree61a53f8303d346c2793d43f80af03e11a7c4027d /meta
parentb325b6632d8a40eb6c0b86f82d0ca11cd293bda0 (diff)
downloadopenembedded-core-contrib-7181e326f1814cbf8b7960b0d4f02bd3a1ce14f8.tar.gz
rust-cross-canadian: Fix ordering of target json config generation
Based upon a patch from Otavio Salvador <otavio@ossystems.com.br>, ensure the target json files are written in the correct order with the most specific last incase it overwrites earlier files if the prefixes match. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/rust/rust-cross-canadian-common.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/recipes-devtools/rust/rust-cross-canadian-common.inc b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc
index 1f21c8af26..df4901f1fa 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian-common.inc
+++ b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc
@@ -27,9 +27,10 @@ DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDP
python do_rust_gen_targets () {
wd = d.getVar('WORKDIR') + '/targets/'
- rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
- rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
+ # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last
rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH'))
+ rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
+ rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
}
INHIBIT_DEFAULT_RUST_DEPS = "1"