Skip to content

Commit

Permalink
Merge pull request NixOS#243683 from reckenrode/nodejs-fix-ar
Browse files Browse the repository at this point in the history
nodejs: use a response file with llvm-ar
  • Loading branch information
toonn authored Jul 16, 2023
2 parents 664361e + 87478fd commit ba7cf6a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkgs/development/web/nodejs/nodejs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 it’s 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
Expand Down

0 comments on commit ba7cf6a

Please sign in to comment.