buildRustCrate: sort linker options in-place

This commit is contained in:
Daniël de Kok 2020-03-13 11:21:07 +01:00
parent ea6e048c37
commit 412c72d20f

View File

@ -102,19 +102,16 @@ in ''
# Remove duplicate linker flags from the build dependencies. # Remove duplicate linker flags from the build dependencies.
if [[ -e target/link.build ]]; then if [[ -e target/link.build ]]; then
sort -u target/link.build > target/link.build.sorted sort -uo target/link.build target/link.build
mv target/link.build.sorted target/link.build
fi fi
# Remove duplicate linker flags from the dependencies. # Remove duplicate linker flags from the dependencies.
sort -u target/link > target/link.sorted sort -uo target/link target/link
mv target/link.sorted target/link
tr '\n' ' ' < target/link > target/link_ tr '\n' ' ' < target/link > target/link_
# Remove duplicate linker flags from the that are written # Remove duplicate linker flags from the that are written
# to the derivation's output. # to the derivation's output.
sort -u target/link.final > target/link.final.sorted sort -uo target/link.final target/link.final
mv target/link.final.sorted target/link.final
EXTRA_BUILD="" EXTRA_BUILD=""
BUILD_OUT_DIR="" BUILD_OUT_DIR=""