rust: add machinery to fetch the snapshot
This is based on Steven Walter's proposed change "rust-git.inc: use bitbake to fetch the snapshot".
This commit is contained in:
@@ -22,6 +22,8 @@ LIC_FILES_CHKSUM ="\
|
|||||||
## stage0 (format_args!() change)
|
## stage0 (format_args!() change)
|
||||||
USE_LOCAL_RUST ??= "0"
|
USE_LOCAL_RUST ??= "0"
|
||||||
|
|
||||||
|
SRC_URI += "${@base_conditional('USE_LOCAL_RUST', '1', 'https://static.rust-lang.org/stage0-snapshots/${RUST_SNAPSHOT};unpack=0', '', d)}"
|
||||||
|
|
||||||
# We generate local targets, and need to be able to locate them
|
# We generate local targets, and need to be able to locate them
|
||||||
export RUST_TARGET_PATH="${WORKDIR}/targets/"
|
export RUST_TARGET_PATH="${WORKDIR}/targets/"
|
||||||
|
|
||||||
@@ -337,6 +339,10 @@ rust_runmake () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_compile () {
|
do_compile () {
|
||||||
|
if [ ${USE_LOCAL_RUST} -ne 1 ]; then
|
||||||
|
mkdir -p dl
|
||||||
|
cp -f ${WORKDIR}/${RUST_SNAPSHOT} dl
|
||||||
|
fi
|
||||||
rust_runmake
|
rust_runmake
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,7 +386,7 @@ USE_LOCAL_RUST_class-native ?= "${@base_conditional('USE_LOCAL_NATIVE_RUST', '0'
|
|||||||
|
|
||||||
# Otherwise we'll depend on what we provide
|
# Otherwise we'll depend on what we provide
|
||||||
INHIBIT_DEFAULT_RUST_DEPS_class-cross = "1"
|
INHIBIT_DEFAULT_RUST_DEPS_class-cross = "1"
|
||||||
DEPENDS_class-cross += "${@base_conditional('USE_LOCAL_RUST', '1', 'rust-native', '')}"
|
DEPENDS_class-cross += "${@base_conditional('USE_LOCAL_RUST', '1', 'rust-native', '', d)}"
|
||||||
DEPENDS_class-cross += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
|
DEPENDS_class-cross += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
|
||||||
PROVIDES_class-cross = "virtual/${TARGET_PREFIX}rust"
|
PROVIDES_class-cross = "virtual/${TARGET_PREFIX}rust"
|
||||||
PN_class-cross = "rust-cross-${TARGET_ARCH}"
|
PN_class-cross = "rust-cross-${TARGET_ARCH}"
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
SRCREV = "b0aad7dd4fad8d7e2e2f877a511a637258949597"
|
SRCREV = "b0aad7dd4fad8d7e2e2f877a511a637258949597"
|
||||||
require rust-git.inc
|
require rust-git.inc
|
||||||
|
|
||||||
|
RUST_SNAPSHOT = "rust-stage0-2015-03-27-5520801-linux-x86_64-ef2154372e97a3cb687897d027fd51c8f2c5f349.tar.bz2"
|
||||||
|
SRC_URI[md5sum] = "6447489e0009519c845b8e350c220636"
|
||||||
|
SRC_URI[sha256sum] = "b62eed6bdb3cb356c90d587e9d9ee7fb5aedad917ff872c04e67e20b4c8f1c91"
|
||||||
|
|
||||||
SRC_URI_append = "\
|
SRC_URI_append = "\
|
||||||
file://0001-libstd-io-process-Command-fully-quote-and-escape-the.patch \
|
file://0001-libstd-io-process-Command-fully-quote-and-escape-the.patch \
|
||||||
file://0002-std-io-process-add-Debug-tests.patch \
|
file://0002-std-io-process-add-Debug-tests.patch \
|
||||||
|
|||||||
Reference in New Issue
Block a user