blob: 5e2ac5bc4b59985ceef9467d8dd100dbab27bba2 [file] [log] [blame]
Primiano Tucci1d409982019-09-19 10:15:18 +01001# Copyright (C) 2019 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Pascal Muetschard6df59d52019-09-25 16:28:00 -070015load("@perfetto_cfg//:perfetto_cfg.bzl", "PERFETTO_CONFIG")
16
Primiano Tucci1d409982019-09-19 10:15:18 +010017cc_library(
18 name = "zlib",
19 srcs = [
Ryan Savitski31751112022-04-02 00:49:07 +010020 "adler32.c",
Lalit Magantifa957e72023-03-16 18:22:23 +000021 "chromeconf.h",
Ryan Savitski31751112022-04-02 00:49:07 +010022 "compress.c",
23 "contrib/optimizations/insert_string.h",
24 "cpu_features.c",
25 "cpu_features.h",
26 "crc32.c",
27 "crc32.h",
28 "deflate.c",
29 "deflate.h",
30 "gzclose.c",
31 "gzguts.h",
32 "gzlib.c",
33 "gzread.c",
34 "gzwrite.c",
35 "infback.c",
36 "inffast.c",
37 "inffast.h",
38 "inffixed.h",
39 "inflate.c",
40 "inflate.h",
41 "inftrees.c",
42 "inftrees.h",
43 "trees.c",
44 "trees.h",
45 "uncompr.c",
46 "zconf.h",
Ryan Savitski31751112022-04-02 00:49:07 +010047 "zutil.c",
48 "zutil.h",
Lalit Magantifa957e72023-03-16 18:22:23 +000049 ],
Primiano Tucci1d409982019-09-19 10:15:18 +010050 hdrs = [
51 "zlib.h",
52 ],
Ryan Savitski31751112022-04-02 00:49:07 +010053 copts = select({
54 "@perfetto//bazel:os_windows": ["-DX86_WINDOWS"],
55 "//conditions:default": [],
56 }) + [
57 "-Wno-unused-function",
Lalit Magantifa957e72023-03-16 18:22:23 +000058 "-DZLIB_IMPLEMENTATION",
59 "-DCHROMIUM_ZLIB_NO_CHROMECONF",
Pascal Muetschard6df59d52019-09-25 16:28:00 -070060 ] + PERFETTO_CONFIG.deps_copts.zlib,
Primiano Tucci1d409982019-09-19 10:15:18 +010061 includes = ["zlib"],
62 visibility = ["//visibility:public"],
63)