mirror of
https://git.yoctoproject.org/poky
synced 2026-05-04 22:39:49 +02:00
rust: Generate per recipe target configuration files
Instead of generating target configuration files centrally and often getting it wrong, or having trouble finding the right set, generate them dynamically from the bbclass into WORKDIR per recipe. (From OE-Core rev: 9160e4a37561d8ac882057450a818621bec13bed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
## Cargo.
|
||||
|
||||
inherit cargo_common
|
||||
inherit rust-target-config
|
||||
|
||||
# the binary we will use
|
||||
CARGO = "cargo"
|
||||
@@ -40,7 +41,7 @@ BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}"
|
||||
CARGO_TARGET_SUBDIR="${RUST_HOST_SYS}/${BUILD_DIR}"
|
||||
oe_cargo_build () {
|
||||
export RUSTFLAGS="${RUSTFLAGS}"
|
||||
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
|
||||
bbnote "Using rust targets from ${RUST_TARGET_PATH}"
|
||||
bbnote "cargo = $(which ${CARGO})"
|
||||
bbnote "rustc = $(which ${RUSTC})"
|
||||
bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@"
|
||||
|
||||
Reference in New Issue
Block a user