rust-native shouldn't depend on TARGET variables

The whole point of rust-native is that it should be common for all
targets.  If we reference TARGET variables during the build of
rust-native, then bitbake will build a different version for different
TARGETS.
This commit is contained in:
Steven Walter
2020-05-11 15:58:52 -04:00
parent a012a1027d
commit 3b783652cc
2 changed files with 18 additions and 14 deletions
+15
View File
@@ -1,6 +1,21 @@
require rust.inc
inherit cross
python do_rust_gen_targets () {
wd = d.getVar('WORKDIR') + '/targets/'
# It is important 'TARGET' is last here so that it overrides our less
# informed choices for BUILD & HOST if TARGET happens to be the same as
# either of them.
for thing in ['BUILD', 'HOST', 'TARGET']:
bb.debug(1, "rust_gen_target for " + thing)
features = ""
cpu = "generic"
if thing is "TARGET":
features = d.getVar('TARGET_LLVM_FEATURES') or ""
cpu = d.getVar('TARGET_LLVM_CPU')
rust_gen_target(d, thing, wd, features, cpu)
}
# Otherwise we'll depend on what we provide
INHIBIT_DEFAULT_RUST_DEPS = "1"