diff options
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/rust/rust-snapshot.inc | 7 | ||||
-rw-r--r-- | meta/recipes-devtools/rust/rust-source.inc | 5 | ||||
-rw-r--r-- | meta/recipes-devtools/rust/rust.inc | 6 |
3 files changed, 12 insertions, 6 deletions
diff --git a/meta/recipes-devtools/rust/rust-snapshot.inc b/meta/recipes-devtools/rust/rust-snapshot.inc index 222f34f9a8..6420bcff55 100644 --- a/meta/recipes-devtools/rust/rust-snapshot.inc +++ b/meta/recipes-devtools/rust/rust-snapshot.inc | |||
@@ -5,7 +5,8 @@ | |||
5 | ## The version is replicated here. | 5 | ## The version is replicated here. |
6 | ## TODO: find a way to add additional SRC_URIs based on the contents of an | 6 | ## TODO: find a way to add additional SRC_URIs based on the contents of an |
7 | ## earlier SRC_URI. | 7 | ## earlier SRC_URI. |
8 | RS_VERSION = "1.65.0" | 8 | |
9 | SNAPSHOT_VERSION = "1.65.0" | ||
9 | CARGO_VERSION = "1.65.0" | 10 | CARGO_VERSION = "1.65.0" |
10 | 11 | ||
11 | # TODO: Add hashes for other architecture toolchains as well. Make a script? | 12 | # TODO: Add hashes for other architecture toolchains as well. Make a script? |
@@ -27,6 +28,6 @@ SRC_URI += " \ | |||
27 | https://static.rust-lang.org/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \ | 28 | https://static.rust-lang.org/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \ |
28 | " | 29 | " |
29 | 30 | ||
30 | RUST_STD_SNAPSHOT = "rust-std-${RS_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" | 31 | RUST_STD_SNAPSHOT = "rust-std-${SNAPSHOT_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" |
31 | RUSTC_SNAPSHOT = "rustc-${RS_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" | 32 | RUSTC_SNAPSHOT = "rustc-${SNAPSHOT_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" |
32 | CARGO_SNAPSHOT = "cargo-${CARGO_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" | 33 | CARGO_SNAPSHOT = "cargo-${CARGO_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" |
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index 1c511917e2..91a6c5a942 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc | |||
@@ -1,4 +1,5 @@ | |||
1 | SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust" | 1 | RUST_VERSION ?= "${@d.getVar('PV').split('-')[0]}" |
2 | SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;name=rust" | ||
2 | SRC_URI[rust.sha256sum] = "0dc176e34fae9871f855a6ba4cb30fa19d69c5b4428d29281a07419c4950715c" | 3 | SRC_URI[rust.sha256sum] = "0dc176e34fae9871f855a6ba4cb30fa19d69c5b4428d29281a07419c4950715c" |
3 | 4 | ||
4 | SRC_URI:append:class-target:pn-rust = " \ | 5 | SRC_URI:append:class-target:pn-rust = " \ |
@@ -6,7 +7,7 @@ SRC_URI:append:class-target:pn-rust = " \ | |||
6 | file://crossbeam_atomic.patch" | 7 | file://crossbeam_atomic.patch" |
7 | SRC_URI:append:class-nativesdk:pn-nativesdk-rust = " file://hardcodepaths.patch" | 8 | SRC_URI:append:class-nativesdk:pn-nativesdk-rust = " file://hardcodepaths.patch" |
8 | 9 | ||
9 | RUSTSRC = "${WORKDIR}/rustc-${PV}-src" | 10 | RUSTSRC = "${WORKDIR}/rustc-${RUST_VERSION}-src" |
10 | 11 | ||
11 | UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html" | 12 | UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html" |
12 | UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src" | 13 | UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src" |
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc index 8d25e7993a..f58aa46444 100644 --- a/meta/recipes-devtools/rust/rust.inc +++ b/meta/recipes-devtools/rust/rust.inc | |||
@@ -13,6 +13,10 @@ DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm" | |||
13 | 13 | ||
14 | S = "${RUSTSRC}" | 14 | S = "${RUSTSRC}" |
15 | 15 | ||
16 | # Use at your own risk, accepted values are stable, beta and nightly | ||
17 | RUST_CHANNEL ?= "stable" | ||
18 | PV .= "${@bb.utils.contains('RUST_CHANNEL', 'stable', '', '-${RUST_CHANNEL}', d)}" | ||
19 | |||
16 | export FORCE_CRATE_HASH="${BB_TASKHASH}" | 20 | export FORCE_CRATE_HASH="${BB_TASKHASH}" |
17 | 21 | ||
18 | RUST_ALTERNATE_EXE_PATH ?= "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config" | 22 | RUST_ALTERNATE_EXE_PATH ?= "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config" |
@@ -116,7 +120,7 @@ python do_configure() { | |||
116 | # [rust] | 120 | # [rust] |
117 | config.add_section("rust") | 121 | config.add_section("rust") |
118 | config.set("rust", "rpath", e(True)) | 122 | config.set("rust", "rpath", e(True)) |
119 | config.set("rust", "channel", e("stable")) | 123 | config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}"))) |
120 | 124 | ||
121 | # Whether or not to optimize the compiler and standard library | 125 | # Whether or not to optimize the compiler and standard library |
122 | config.set("rust", "optimize", e(True)) | 126 | config.set("rust", "optimize", e(True)) |