1# Copyright (C) 2024 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 15load("@perfetto_cfg//:perfetto_cfg.bzl", "PERFETTO_CONFIG") 16 17cc_library( 18 name = "expat", 19 hdrs = glob(["expat/lib/*.h"]), 20 deps = [ 21 ":expat_impl", 22 ], 23 visibility = ["//visibility:public"], 24) 25 26cc_library( 27 name = "expat_impl", 28 srcs = [ 29 "expat/lib/xmlparse.c", 30 "expat/lib/xmlrole.c", 31 "expat/lib/xmltok.c", 32 ], 33 hdrs = [ 34 "expat/lib/ascii.h", 35 "expat/lib/asciitab.h", 36 "expat/lib/expat.h", 37 "expat/lib/expat_external.h", 38 "expat/lib/iasciitab.h", 39 "expat/lib/internal.h", 40 "expat/lib/latin1tab.h", 41 "expat/lib/nametab.h", 42 "expat/lib/siphash.h", 43 "expat/lib/utf8tab.h", 44 "expat/lib/winconfig.h", 45 "expat/lib/xmlrole.h", 46 "expat/lib/xmltok.h", 47 "expat/lib/xmltok_impl.c", 48 "expat/lib/xmltok_impl.h", 49 "expat/lib/xmltok_ns.c", 50 ], 51 deps = [ 52 "@perfetto//buildtools/expat/include:expat_config", 53 ], 54 copts = [ 55 "-DHAVE_EXPAT_CONFIG_H", 56 ] + PERFETTO_CONFIG.deps_copts.expat, 57 defines = [ 58 "XML_STATIC" 59 ], 60 includes = [ 61 "expat", 62 "expat/lib", 63 ], 64) 65