Check link type based on expanded parameters

So far we've ignored response files in arguments, and did not
check linkType against expanded parameters.  This means if
we have `-static` in a @reponse-file, linkType will not be
set to `-static` as we never check against the expanded arguments
from response files.
main
Moritz Angermann 2 years ago
parent 4ef6469342
commit 14996789a1
No known key found for this signature in database
GPG Key ID: A98C646D142C675F
  1. 2
      pkgs/build-support/bintools-wrapper/ld-wrapper.sh
  2. 2
      pkgs/build-support/cc-wrapper/cc-wrapper.sh

@ -30,7 +30,7 @@ expandResponseParams "$@"
if [[ -n "${NIX_LINK_TYPE_@suffixSalt@:-}" ]]; then
linkType=$NIX_LINK_TYPE_@suffixSalt@
else
linkType=$(checkLinkType "$@")
linkType=$(checkLinkType "${params[@]}")
fi
if [[ "${NIX_ENFORCE_PURITY:-}" = 1 && -n "${NIX_STORE:-}"

@ -31,7 +31,7 @@ cxxLibrary=1
cInclude=1
expandResponseParams "$@"
linkType=$(checkLinkType "$@")
linkType=$(checkLinkType "${params[@]}")
declare -i n=0
nParams=${#params[@]}

Loading…
Cancel
Save