mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
buildRustCrate: don't sort link flags
Linkage order is significant and sorting can result in link errors.
This commit is contained in:
parent
1ff9d94f38
commit
d8b853799d
|
@ -172,7 +172,7 @@ in ''
|
|||
set +e
|
||||
EXTRA_BUILD=$(sed -n "s/^cargo:rustc-flags=\(.*\)/\1/p" target/build/${crateName}.opt | tr '\n' ' ' | sort -u)
|
||||
EXTRA_FEATURES=$(sed -n "s/^cargo:rustc-cfg=\(.*\)/--cfg \1/p" target/build/${crateName}.opt | tr '\n' ' ')
|
||||
EXTRA_LINK=$(sed -n "s/^cargo:rustc-link-lib=\(.*\)/\1/p" target/build/${crateName}.opt | tr '\n' ' ' | sort -u)
|
||||
EXTRA_LINK=$(sed -n "s/^cargo:rustc-link-lib=\(.*\)/\1/p" target/build/${crateName}.opt | tr '\n' ' ')
|
||||
EXTRA_LINK_SEARCH=$(sed -n "s/^cargo:rustc-link-search=\(.*\)/\1/p" target/build/${crateName}.opt | tr '\n' ' ' | sort -u)
|
||||
|
||||
for env in $(sed -n "s/^cargo:rustc-env=\(.*\)/\1/p" target/build/${crateName}.opt); do
|
||||
|
|
|
@ -105,11 +105,6 @@ setup_link_paths() {
|
|||
done
|
||||
|
||||
if [[ -e target/link ]]; then
|
||||
sort -u target/link.final > target/link.final.sorted
|
||||
mv target/link.final.sorted target/link.final
|
||||
sort -u target/link > target/link.sorted
|
||||
mv target/link.sorted target/link
|
||||
|
||||
tr '\n' ' ' < target/link > target/link_
|
||||
LINK=$(cat target/link_)
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue