diff options
-rw-r--r-- | meta/classes/rust-target-config.bbclass | 10 | ||||
-rw-r--r-- | meta/recipes-devtools/cargo/cargo-cross-canadian.inc | 7 | ||||
-rw-r--r-- | meta/recipes-devtools/rust/rust-cross-canadian-common.inc | 8 | ||||
-rw-r--r-- | meta/recipes-devtools/rust/rust-cross.inc | 8 |
4 files changed, 11 insertions, 22 deletions
diff --git a/meta/classes/rust-target-config.bbclass b/meta/classes/rust-target-config.bbclass index 4db91d36d5..87b7dee3ed 100644 --- a/meta/classes/rust-target-config.bbclass +++ b/meta/classes/rust-target-config.bbclass | |||
@@ -357,10 +357,16 @@ rust_gen_target[vardepsexclude] += "RUST_HOST_SYS RUST_TARGET_SYS ABIEXTENSION l | |||
357 | 357 | ||
358 | do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES" | 358 | do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES" |
359 | 359 | ||
360 | RUST_TARGETGENS = "BUILD" | ||
361 | |||
360 | python do_rust_gen_targets () { | 362 | python do_rust_gen_targets () { |
361 | wd = d.getVar('WORKDIR') + '/targets/' | 363 | wd = d.getVar('WORKDIR') + '/targets/' |
362 | build_arch = d.getVar('BUILD_ARCH') | 364 | # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last |
363 | rust_gen_target(d, 'BUILD', wd, build_arch) | 365 | rust_gen_target(d, 'BUILD', wd, d.getVar('BUILD_ARCH')) |
366 | if "HOST" in d.getVar("RUST_TARGETGENS"): | ||
367 | rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH')) | ||
368 | if "TARGET" in d.getVar("RUST_TARGETGENS"): | ||
369 | rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_ARCH')) | ||
364 | } | 370 | } |
365 | 371 | ||
366 | addtask rust_gen_targets after do_patch before do_compile | 372 | addtask rust_gen_targets after do_patch before do_compile |
diff --git a/meta/recipes-devtools/cargo/cargo-cross-canadian.inc b/meta/recipes-devtools/cargo/cargo-cross-canadian.inc index e83b6a67b3..a2fac929d4 100644 --- a/meta/recipes-devtools/cargo/cargo-cross-canadian.inc +++ b/meta/recipes-devtools/cargo/cargo-cross-canadian.inc | |||
@@ -28,12 +28,7 @@ inherit cross-canadian | |||
28 | 28 | ||
29 | PN = "cargo-cross-canadian-${TRANSLATED_TARGET_ARCH}" | 29 | PN = "cargo-cross-canadian-${TRANSLATED_TARGET_ARCH}" |
30 | 30 | ||
31 | python do_rust_gen_targets () { | 31 | RUST_TARGETGENS = "BUILD HOST" |
32 | wd = d.getVar('WORKDIR') + '/targets/' | ||
33 | |||
34 | rust_gen_target(d, 'BUILD', wd, d.getVar('BUILD_ARCH')) | ||
35 | rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH')) | ||
36 | } | ||
37 | 32 | ||
38 | do_compile:prepend () { | 33 | do_compile:prepend () { |
39 | PKG_CONFIG_PATH="${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig:${PKG_CONFIG_PATH}" | 34 | PKG_CONFIG_PATH="${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig:${PKG_CONFIG_PATH}" |
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 | ||
28 | python do_rust_gen_targets () { | 28 | RUST_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 | ||
36 | INHIBIT_DEFAULT_RUST_DEPS = "1" | 30 | INHIBIT_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 @@ | |||
1 | python do_rust_gen_targets () { | 1 | RUST_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 |
10 | INHIBIT_DEFAULT_RUST_DEPS = "1" | 4 | INHIBIT_DEFAULT_RUST_DEPS = "1" |