From 54040e4b1b29f38a32549db01ca2763f4191c839 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sat, 19 Jan 2019 14:26:25 -0200 Subject: [PATCH] shutils/common.sh: define CARGO_BUILD_JOBS and CARGO_TARGE_${RUST_TAGRGET}_LINKER. --- common/xbps-src/shutils/common.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 86f7f9f6b8f..2e19fd4f59a 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -463,6 +463,11 @@ setup_pkg() { export LDFLAGS_FOR_BUILD="$XBPS_LDFLAGS" 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 # Regular tools names export CC="${XBPS_CROSS_TRIPLET}-gcc" @@ -523,6 +528,13 @@ setup_pkg() { export RUSTFLAGS="$XBPS_CROSS_RUSTFLAGS" # Rust target, which differs from our triplets 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 export CC="cc" export CXX="g++"