cargo_util: pass RUSTFLAGS to cargo build
This commit is contained in:
committed by
Steven Walter
parent
d320edc05f
commit
e3140137e5
@@ -36,12 +36,14 @@ export RUST_CFLAGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${CFLAGS}"
|
|||||||
export RUST_BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc"
|
export RUST_BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc"
|
||||||
export RUST_BUILD_CFLAGS = "${BUILD_CC_ARCH} ${BUILD_CFLAGS}"
|
export RUST_BUILD_CFLAGS = "${BUILD_CC_ARCH} ${BUILD_CFLAGS}"
|
||||||
|
|
||||||
|
RUSTFLAGS ??= ""
|
||||||
export CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} --release"
|
export CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} --release"
|
||||||
|
|
||||||
# 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.
|
||||||
export CARGO_TARGET_SUBDIR="${HOST_SYS}/release"
|
export CARGO_TARGET_SUBDIR="${HOST_SYS}/release"
|
||||||
oe_cargo_build () {
|
oe_cargo_build () {
|
||||||
|
export RUSTFLAGS="${RUSTFLAGS}"
|
||||||
bbnote "cargo = $(which cargo)"
|
bbnote "cargo = $(which cargo)"
|
||||||
bbnote "rustc = $(which rustc)"
|
bbnote "rustc = $(which rustc)"
|
||||||
bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@"
|
bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@"
|
||||||
|
|||||||
Reference in New Issue
Block a user