do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES"
+RUST_TARGETGENS = "BUILD"
+
python do_rust_gen_targets () {
wd = d.getVar('WORKDIR') + '/targets/'
- build_arch = d.getVar('BUILD_ARCH')
- rust_gen_target(d, 'BUILD', wd, build_arch)
+ # 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'))
+ if "HOST" in d.getVar("RUST_TARGETGENS"):
+ rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH'))
+ if "TARGET" in d.getVar("RUST_TARGETGENS"):
+ rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_ARCH'))
}
addtask rust_gen_targets after do_patch before do_compile
PN = "cargo-cross-canadian-${TRANSLATED_TARGET_ARCH}"
-python do_rust_gen_targets () {
- wd = d.getVar('WORKDIR') + '/targets/'
-
- rust_gen_target(d, 'BUILD', wd, d.getVar('BUILD_ARCH'))
- rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH'))
-}
+RUST_TARGETGENS = "BUILD HOST"
do_compile:prepend () {
PKG_CONFIG_PATH="${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig:${PKG_CONFIG_PATH}"
-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"
-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"