BUILD.zlib 1.52 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
# Copyright 2021 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

cc_library(
    name = "zlib",
    srcs = [
        "adler32.c",
        "chromeconf.h",
        "compress.c",
        "contrib/optimizations/insert_string.h",
        "cpu_features.c",
        "cpu_features.h",
        "crc32.c",
        "crc32.h",
        "deflate.c",
        "deflate.h",
        "gzclose.c",
        "gzguts.h",
        "gzlib.c",
        "gzread.c",
        "gzwrite.c",
        "infback.c",
        "inffast.c",
        "inffast.h",
        "inffixed.h",
        "inflate.c",
        "inflate.h",
        "inftrees.c",
        "inftrees.h",
31
        "slide_hash_simd.h",
32 33 34 35 36 37 38
        "trees.c",
        "trees.h",
        "uncompr.c",
        "zconf.h",
        "zlib.h",
        "zutil.c",
        "zutil.h",
39
    ],
40 41 42 43 44 45
    hdrs = [
        "zlib.h",
    ],
    defines = [
        "CHROMIUM_ZLIB_NO_CHROMECONF",
        "CPU_NO_SIMD",
46 47 48 49 50 51
    ] + select({
        "@platforms//os:windows": [],
        "//conditions:default": [
            "HAVE_HIDDEN",
        ],
    }),
52
    include_prefix = "third_party/zlib",
53 54
    visibility = ["//visibility:public"],
)
55 56 57 58 59 60 61 62 63 64 65 66

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 = [
67
        "//external:zlib",
68 69
    ],
)