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.
This commit is contained in:
Moritz Angermann 2021-12-28 11:04:36 +08:00
parent 4ef6469342
commit 14996789a1
No known key found for this signature in database
GPG key ID: A98C646D142C675F
2 changed files with 2 additions and 2 deletions

View file

@ -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:-}"

View file

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