Skip to content

Commit aadb0b3

Browse files
committed
deps: delet deps/v8/third_party/zlib
We currently have two copies of Chromium's zlib: one in deps/zlib and another in deps/v8/third_party/zlib. This has a couple of disadvantages: 1. There is an additional cost to keeping both dependencies up-to-date, and in fact they were already out-of-sync (see the refs). 2. People who compile with --shared-zlib (i.e. distro maintainers) will probably not be thrilled to learn that there is still a copy of zlib inside. 3. It's aesthetically unpleasing. This diff (per discussion in the refs) centralizes on deps/zlib and deletes deps/v8/third_party/zlib. That requires changing the include headers in two files in deps/v8/src, which was pretty straightforward. When the user requests compiling with a shared zlib build, we still need to compile the contents of deps/zlib/google. This is not ideal but it's also not a change in behavior: prior to this diff those files were being compiled in the deps/v8/third_party/zlib version. I tested this on Linux with the default build and a --shared-zlib build. I checked that the shared-zlib build dynamically linked zlib according to ldd, and that the regular build did not. I would appreciate if the reviewers could suggest some other build configurations to try. Refs: nodejs#47145 Refs: nodejs#47157
1 parent 4b80a7b commit aadb0b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+23
-45377
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.3',
39+
'v8_embedder_string': '-node.4',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/deoptimizer/translation-array.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "src/objects/fixed-array-inl.h"
1010

1111
#ifdef V8_USE_ZLIB
12-
#include "third_party/zlib/google/compression_utils_portable.h"
12+
#include "compression_utils_portable.h"
1313
#endif // V8_USE_ZLIB
1414

1515
namespace v8 {

deps/v8/src/snapshot/snapshot-utils.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "src/base/sanitizer/msan.h"
88

99
#ifdef V8_USE_ZLIB
10-
#include "third_party/zlib/zlib.h"
10+
#include "zlib.h"
1111
#endif
1212

1313
namespace v8 {

0 commit comments

Comments
 (0)