Skip to content

Commit 4c6343f

Browse files
sam-githubcodebytere
authored andcommittedFeb 27, 2020
doc: describe how to update zlib
See: - #31201 PR-URL: #31800 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
1 parent b30a698 commit 4c6343f

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed
 

‎doc/guides/maintaining-zlib.md

+32-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
1-
This copy of zlib comes from the Chromium team's zlib fork which incorporated performance improvements not currently available in standard zlib.
1+
# Maintaining zlib
22

3-
To update this code:
3+
This copy of zlib comes from the Chromium team's zlib fork which incorporated
4+
performance improvements not currently available in standard zlib.
45

5-
* Clone https://chromium.googlesource.com/chromium/src/third_party/zlib
6-
* Comment out the `#include "chromeconf.h"` in zconf.h to maintain full compatibility with node addons
6+
## Updating zlib
7+
8+
Update zlib:
9+
```shell
10+
git clone https://chromium.googlesource.com/chromium/src/third_party/zlib
11+
cp deps/zlib/zlib.gyp deps/zlib/win32/zlib.def deps
12+
rm -rf deps/zlib zlib/.git
13+
mv zlib deps/
14+
mv deps/zlib.gyp deps/zlib/
15+
mkdir deps/zlib/win32
16+
mv deps/zlib.def deps/zlib/win32
17+
sed -i -- 's_^#include "chromeconf.h"_//#include "chromeconf.h"_' deps/zlib/zconf.h
18+
```
19+
20+
Check that Node.js still builds and tests.
21+
22+
It may be necessary to update deps/zlib/zlib.gyp if any significant changes have
23+
occurred upstream.
24+
25+
## Commiting zlib
26+
27+
Add zlib: `git add --all deps/zlib`
28+
29+
Commit the changes with a message like
30+
```text
31+
deps: update zlib to upstream d7f3ca9
32+
33+
Updated as described in doc/guides/maintaining-zlib.md.
34+
```

0 commit comments

Comments
 (0)
Please sign in to comment.