Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Comment on lines +163 to +164
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me too. I wonder though if there some way to find out whether llvm-ar is expected at eval time in nix so the block becomes:

${if stdenv.buildPlatform.isGnu || stdenv.buildPlatform.isLlvmAr} then ''
    ar -cqs $libv8/lib/libv8.a @files
'' else ''
    ...
''

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not currently. We discussed in the Matrix room.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we would set isLLVM, but Darwin isn’t a pure-LLVM platform. Maybe someday, but that’s still a ways off.

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