Merge pull request #243683 from reckenrode/nodejs-fix-ar

nodejs: use a response file with llvm-ar
This commit is contained in:
toonn 2023-07-16 12:43:34 +02:00 committed by GitHub
commit ba7cf6a456
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,9 +160,14 @@ let
${if stdenv.buildPlatform.isGnu then ''
ar -cqs $libv8/lib/libv8.a @files
'' else ''
cat files | while read -r file; do
ar -cqS $libv8/lib/libv8.a $file
done
# llvm-ar supports response files, so take advantage of it if its available.
if [ "$(basename $(readlink -f $(command -v ar)))" = "llvm-ar" ]; then
ar -cqs $libv8/lib/libv8.a @files
else
cat files | while read -r file; do
ar -cqS $libv8/lib/libv8.a $file
done
fi
''}
popd