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:
committed by
Steven Walter
parent
bd80824ddf
commit
c83864ce19
@@ -24,7 +24,6 @@ export RUST_BACKTRACE = "1"
|
|||||||
|
|
||||||
RUSTFLAGS ??= ""
|
RUSTFLAGS ??= ""
|
||||||
CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} --release"
|
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
|
# This is based on the content of CARGO_BUILD_FLAGS and generally will need to
|
||||||
# change if CARGO_BUILD_FLAGS changes.
|
# change if CARGO_BUILD_FLAGS changes.
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ do_configure () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
oe_runrustc () {
|
oe_runrustc () {
|
||||||
|
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
|
||||||
bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
||||||
"${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
"${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ FILES_${PN}-dbg += "${rustlibdir}/.debug"
|
|||||||
RUSTLIB = "-L ${STAGING_LIBDIR}/rust"
|
RUSTLIB = "-L ${STAGING_LIBDIR}/rust"
|
||||||
RUSTFLAGS += "${RUSTLIB}"
|
RUSTFLAGS += "${RUSTLIB}"
|
||||||
RUSTLIB_DEP ?= "libstd-rs"
|
RUSTLIB_DEP ?= "libstd-rs"
|
||||||
|
RUST_TARGET_PATH = "${STAGING_LIBDIR_NATIVE}/rustlib"
|
||||||
|
|
||||||
# Responsible for taking Yocto triples and converting it to Rust triples
|
# Responsible for taking Yocto triples and converting it to Rust triples
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user