Files
node/doc/contributing/maintaining-zlib.md
Richard Lau 09bc89daba build: rework gyp files for zlib
Restructure the zlib.gyp file based on the upstream gn file, breaking
out the files with optimizations that need additional compiler flags.

Use a copy of the GN-scraper.py script to reduce the amount of hand
editing when the zlib dependency is updated.

PR-URL: https://github.com/nodejs/node/pull/45589
Fixes: https://github.com/nodejs/node/issues/32856
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-12-12 16:17:49 +00:00

943 B

Maintaining zlib

This copy of zlib comes from the Chromium team's zlib fork which incorporated performance improvements not currently available in standard zlib.

Updating zlib

Update zlib:

git clone https://chromium.googlesource.com/chromium/src/third_party/zlib
cp deps/zlib/zlib.gyp deps/zlib/GN-scraper.py deps/zlib/win32/zlib.def deps
rm -rf deps/zlib zlib/.git
mv zlib deps/
mv deps/zlib.gyp deps/GN-scraper.py deps/zlib/
mkdir deps/zlib/win32
mv deps/zlib.def deps/zlib/win32
sed -i -- 's_^#include "chromeconf.h"_//#include "chromeconf.h"_' deps/zlib/zconf.h

Check that Node.js still builds and tests.

It may be necessary to update deps/zlib/zlib.gyp if any significant changes have occurred upstream.

Committing zlib

Add zlib: git add --all deps/zlib

Commit the changes with a message like

deps: update zlib to upstream d7f3ca9

Updated as described in doc/contributing/maintaining-zlib.md.