shutils/common.sh: define CARGO_BUILD_JOBS and
CARGO_TARGE_${RUST_TAGRGET}_LINKER.
This commit is contained in:
parent
56460d9463
commit
54040e4b1b
|
@ -463,6 +463,11 @@ setup_pkg() {
|
||||||
export LDFLAGS_FOR_BUILD="$XBPS_LDFLAGS"
|
export LDFLAGS_FOR_BUILD="$XBPS_LDFLAGS"
|
||||||
export FFLAGS_FOR_BUILD="$XBPS_FFLAGS"
|
export FFLAGS_FOR_BUILD="$XBPS_FFLAGS"
|
||||||
|
|
||||||
|
# Define equivalent of TOML config in environment
|
||||||
|
# [build]
|
||||||
|
# jobs = $XBPS_MAKEJOBS
|
||||||
|
export CARGO_BUILD_JOBS="$XBPS_MAKEJOBS"
|
||||||
|
|
||||||
if [ -n "$cross" ]; then
|
if [ -n "$cross" ]; then
|
||||||
# Regular tools names
|
# Regular tools names
|
||||||
export CC="${XBPS_CROSS_TRIPLET}-gcc"
|
export CC="${XBPS_CROSS_TRIPLET}-gcc"
|
||||||
|
@ -523,6 +528,13 @@ setup_pkg() {
|
||||||
export RUSTFLAGS="$XBPS_CROSS_RUSTFLAGS"
|
export RUSTFLAGS="$XBPS_CROSS_RUSTFLAGS"
|
||||||
# Rust target, which differs from our triplets
|
# Rust target, which differs from our triplets
|
||||||
export RUST_TARGET="$XBPS_CROSS_RUST_TARGET"
|
export RUST_TARGET="$XBPS_CROSS_RUST_TARGET"
|
||||||
|
# Define equivalent of TOML config in environment
|
||||||
|
# [target.${RUST_TARGET}]
|
||||||
|
# linker = ${CC}
|
||||||
|
_XBPS_CROSS_RUST_TARGET_ENV="${XBPS_CROSS_RUST_TARGET^^}"
|
||||||
|
_XBPS_CROSS_RUST_TARGET_ENV="${_XBPS_CROSS_RUST_TARGET_ENV//-/_}"
|
||||||
|
export CARGO_TARGET_${_XBPS_CROSS_RUST_TARGET_ENV}_LINKER="$CC"
|
||||||
|
unset _XBPS_CROSS_RUST_TARGET_ENV
|
||||||
else
|
else
|
||||||
export CC="cc"
|
export CC="cc"
|
||||||
export CXX="g++"
|
export CXX="g++"
|
||||||
|
|
Loading…
Reference in New Issue