Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Martin Jansa
2021-02-07 20:08:13 +01:00
parent d15e66ae93
commit c976184935
4 changed files with 4 additions and 33 deletions

View File

@@ -1,8 +1,3 @@
require recipes-devtools/rust/rust-source-${PV}.inc
require recipes-devtools/rust/rust-snapshot-${PV}.inc
require cargo.inc
LIC_FILES_CHKSUM += " \
file://LICENSE-APACHE;md5=71b224ca933f0676e26d5c2e2271331c \
file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \
"

View File

@@ -1,19 +1,11 @@
require rust-snapshot.inc
## This is information on the rust-snapshot (binary) used to build our current release.
## snapshot info is taken from rust/src/stage0.txt
## TODO: find a way to add additional SRC_URIs based on the contents of an
## earlier SRC_URI.
RS_VERSION = "1.48.0"
RUSTC_SNAPSHOT = "rustc-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu"
RUST_STD_SNAPSHOT = "rust-std-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu"
CARGO_VERSION = "1.48.0"
CARGO_SNAPSHOT = "cargo-${CARGO_VERSION}-${BUILD_ARCH}-unknown-linux-gnu"
SRC_URI += " \
https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
https://static.rust-lang.org/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
"
# TODO: Add hashes for other architecture toolchains as well. Make a script?
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "1c00a6a0dabbf6290728b09f9307d9fa6cc985487f727075c68acd4a600ef3f8"

View File

@@ -1,10 +1,3 @@
SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust"
require rust-source.inc
SRC_URI[rust.sha256sum] = "ebe910edc824a0a037a10be443446a0511923ba8342fa3c331ec8a22481d5d15"
# later versions of rust change the directory that they unextract to
RUSTSRC = "${WORKDIR}/rustc-${PV}-src"
# set this as our default
S = "${RUSTSRC}"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"

View File

@@ -1,4 +1,4 @@
require rust.inc
require rust-target.inc
require rust-source-${PV}.inc
require rust-snapshot-${PV}.inc
@@ -6,13 +6,6 @@ SRC_URI += "\
file://0001-rustc_target-Fix-dash-vs-underscore-mismatches-in-op.patch \
"
DEPENDS += "rust-llvm (=${PV})"
# Otherwise we'll depend on what we provide
INHIBIT_DEFAULT_RUST_DEPS_class-native = "1"
# We don't need to depend on gcc-native because yocto assumes it exists
PROVIDES_class-native = "virtual/${TARGET_PREFIX}rust"
do_compile () {
rust_runx build --stage 2
}
@@ -20,5 +13,3 @@ do_compile () {
rust_do_install() {
rust_runx install
}
BBCLASSEXTEND = "native"