rust-bin: get RUST_TARGET_PATH from rust-common

Since commit 06a138a ("rust: drop custom target finding patch"), rustc
is no longer self-sufficient in finding its target specifications. Any
usage of rustc needs RUST_TARGET_PATH set in the environment.

Move the declaration to rust-common.bbclass and add the export to
rust-bin where rustc is invoked.
This commit is contained in:
Tyler Hall
2017-10-16 14:06:36 -04:00
committed by Steven Walter
parent bd80824ddf
commit c83864ce19
3 changed files with 2 additions and 1 deletions
-1
View File
@@ -24,7 +24,6 @@ export RUST_BACKTRACE = "1"
RUSTFLAGS ??= ""
CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} --release"
RUST_TARGET_PATH = "${STAGING_LIBDIR_NATIVE}/rustlib"
# This is based on the content of CARGO_BUILD_FLAGS and generally will need to
# change if CARGO_BUILD_FLAGS changes.
+1
View File
@@ -56,6 +56,7 @@ do_configure () {
}
oe_runrustc () {
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
"${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
}
+1
View File
@@ -7,6 +7,7 @@ FILES_${PN}-dbg += "${rustlibdir}/.debug"
RUSTLIB = "-L ${STAGING_LIBDIR}/rust"
RUSTFLAGS += "${RUSTLIB}"
RUSTLIB_DEP ?= "libstd-rs"
RUST_TARGET_PATH = "${STAGING_LIBDIR_NATIVE}/rustlib"
# Responsible for taking Yocto triples and converting it to Rust triples