Primiano Tucci | 1d40998 | 2019-09-19 10:15:18 +0100 | [diff] [blame] | 1 | # 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 Muetschard | 6df59d5 | 2019-09-25 16:28:00 -0700 | [diff] [blame] | 15 | load("@perfetto_cfg//:perfetto_cfg.bzl", "PERFETTO_CONFIG") |
| 16 | |
Primiano Tucci | 1d40998 | 2019-09-19 10:15:18 +0100 | [diff] [blame] | 17 | cc_library( |
| 18 | name = "zlib", |
| 19 | srcs = [ |
Ryan Savitski | 3175111 | 2022-04-02 00:49:07 +0100 | [diff] [blame] | 20 | "adler32.c", |
Lalit Maganti | fa957e7 | 2023-03-16 18:22:23 +0000 | [diff] [blame] | 21 | "chromeconf.h", |
Ryan Savitski | 3175111 | 2022-04-02 00:49:07 +0100 | [diff] [blame] | 22 | "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 Savitski | 3175111 | 2022-04-02 00:49:07 +0100 | [diff] [blame] | 47 | "zutil.c", |
| 48 | "zutil.h", |
Lalit Maganti | fa957e7 | 2023-03-16 18:22:23 +0000 | [diff] [blame] | 49 | ], |
Primiano Tucci | 1d40998 | 2019-09-19 10:15:18 +0100 | [diff] [blame] | 50 | hdrs = [ |
| 51 | "zlib.h", |
| 52 | ], |
Ryan Savitski | 3175111 | 2022-04-02 00:49:07 +0100 | [diff] [blame] | 53 | copts = select({ |
| 54 | "@perfetto//bazel:os_windows": ["-DX86_WINDOWS"], |
| 55 | "//conditions:default": [], |
| 56 | }) + [ |
| 57 | "-Wno-unused-function", |
Lalit Maganti | fa957e7 | 2023-03-16 18:22:23 +0000 | [diff] [blame] | 58 | "-DZLIB_IMPLEMENTATION", |
| 59 | "-DCHROMIUM_ZLIB_NO_CHROMECONF", |
Pascal Muetschard | 6df59d5 | 2019-09-25 16:28:00 -0700 | [diff] [blame] | 60 | ] + PERFETTO_CONFIG.deps_copts.zlib, |
Primiano Tucci | 1d40998 | 2019-09-19 10:15:18 +0100 | [diff] [blame] | 61 | includes = ["zlib"], |
| 62 | visibility = ["//visibility:public"], |
| 63 | ) |