mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
cargo.eclass: Respect existing CARGO_TARGET_${TRIPLE}_RUSTFLAGS
This variable is used to disable crt-static with musl. Closes: https://bugs.gentoo.org/940197 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
@@ -585,7 +585,7 @@ cargo_env() {
|
||||
local -x CARGO_BUILD_TARGET=$(rust_abi)
|
||||
local TRIPLE=${CARGO_BUILD_TARGET//-/_}
|
||||
local TRIPLE=${TRIPLE^^} LD_A=( $(tc-getCC) ${LDFLAGS} )
|
||||
local -x CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS="-C strip=none -C linker=${LD_A[0]}"
|
||||
local -Ix CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS+=" -C strip=none -C linker=${LD_A[0]}"
|
||||
[[ ${#LD_A[@]} -gt 1 ]] && local CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS+="$(printf -- ' -C link-arg=%s' "${LD_A[@]:1}")"
|
||||
local CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS+=" ${RUSTFLAGS}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user