[bazel] Split zlib into core and compression utils.

This allows other Bazel projects to use their existing zlib import,
and only pull compression utils from Chromium's zlib.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Change-Id: I1f88632dd07661312aa2aaf8716c1742c1f29c53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3375479
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78551}
This commit is contained in:
Piotr Sikora 2022-01-10 12:09:48 -08:00 committed by V8 LUCI CQ
parent 12bb012592
commit f2724654a5
2 changed files with 17 additions and 4 deletions

View File

@ -3383,6 +3383,7 @@ v8_library(
":v8_libbase",
"@com_googlesource_chromium_base_trace_event_common//:trace_event_common",
"@com_googlesource_chromium_zlib//:zlib",
"@com_googlesource_chromium_zlib//:zlib_compression_utils",
],
)

View File

@ -36,12 +36,9 @@ cc_library(
"zlib.h",
"zutil.c",
"zutil.h",
"google/compression_utils_portable.h",
"google/compression_utils_portable.cc",
],
],
hdrs = [
"zlib.h",
"google/compression_utils_portable.h",
],
include_prefix = "third_party/zlib",
defines = [
@ -55,3 +52,18 @@ cc_library(
}),
visibility = ["//visibility:public"],
)
cc_library(
name = "zlib_compression_utils",
srcs = [
"google/compression_utils_portable.cc",
],
hdrs = [
"google/compression_utils_portable.h",
],
include_prefix = "third_party/zlib",
visibility = ["//visibility:public"],
deps = [
":zlib",
],
)