| 1 |
# This file will be copied into //third_party/externals/expat via the new_local_repository |
| 2 |
# rule in WORKSPACE.bazel, so all files should be relative to that path. |
| 3 |
|
| 4 |
load("@rules_cc//cc:cc_library.bzl", "cc_library") |
| 5 |
|
| 6 |
EXPAT_HDRS = [ |
| 7 |
"expat/lib/expat.h", |
| 8 |
] |
| 9 |
|
| 10 |
EXPAT_SRCS = [ |
| 11 |
"expat/lib/ascii.h", |
| 12 |
"expat/lib/asciitab.h", |
| 13 |
"expat/lib/expat.h", |
| 14 |
"expat/lib/expat_external.h", |
| 15 |
"expat/lib/iasciitab.h", |
| 16 |
"expat/lib/internal.h", |
| 17 |
"expat/lib/latin1tab.h", |
| 18 |
"expat/lib/nametab.h", |
| 19 |
"expat/lib/siphash.h", |
| 20 |
"expat/lib/utf8tab.h", |
| 21 |
"expat/lib/winconfig.h", |
| 22 |
"expat/lib/xmlparse.c", |
| 23 |
"expat/lib/xmlrole.c", |
| 24 |
"expat/lib/xmlrole.h", |
| 25 |
"expat/lib/xmltok.c", |
| 26 |
"expat/lib/xmltok.h", |
| 27 |
"expat/lib/xmltok_impl.h", |
| 28 |
# We expect this to be copied in via the repository_rule that checks out expat |
| 29 |
"expat_config.h", |
| 30 |
] |
| 31 |
|
| 32 |
TEXTUAL_HDRS = [ |
| 33 |
"expat/lib/xmltok_impl.c", |
| 34 |
"expat/lib/xmltok_ns.c", |
| 35 |
] |
| 36 |
|
| 37 |
cc_library( |
| 38 |
name = "expat", |
| 39 |
srcs = EXPAT_SRCS, |
| 40 |
hdrs = EXPAT_HDRS, |
| 41 |
# EXPAT_FMT_PTRDIFF_T uses outdated format specifiers |
| 42 |
copts = ["-Wno-format"], |
| 43 |
defines = [ |
| 44 |
"XML_STATIC", |
| 45 |
], |
| 46 |
includes = [ |
| 47 |
"expat/lib", |
| 48 |
], |
| 49 |
textual_hdrs = TEXTUAL_HDRS, |
| 50 |
visibility = ["//visibility:public"], |
| 51 |
) |