blob: a7fd6b0c8105e3f30f3458835853e1f834482d3d [file] [log] [blame]
Dan Willemsen83b10fc2016-07-26 15:29:22 -07001// We need to build this for both the device (as a shared library)
2// and the host (as a static library for tools to use).
3
Bob Badour28070502021-02-12 18:39:07 -08004// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
5// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
6// DEPENDING ON IT IN YOUR PROJECT. ***
7package {
8 default_applicable_licenses: ["external_expat_license"],
9}
10
11// Added automatically by a large-scale-change that took the approach of
12// 'apply every license found to every target'. While this makes sure we respect
13// every license restriction, it may not be entirely correct.
14//
15// e.g. GPL in an MIT project might only apply to the contrib/ directory.
16//
17// Please consider splitting the single license below into multiple licenses,
18// taking care not to lose any license_kind information, and overriding the
19// default license using the 'licenses: [...]' property on targets as needed.
20//
21// For unused files, consider creating a 'fileGroup' with "//visibility:private"
22// to attach the license to, and including a comment whether the files may be
23// used in the current project.
24// See: http://go/android-license-faq
25license {
26 name: "external_expat_license",
27 visibility: [":__subpackages__"],
28 license_kinds: [
29 "SPDX-license-identifier-CC0-1.0",
30 "SPDX-license-identifier-GFDL", // by exception only
31 "SPDX-license-identifier-MIT",
32 "legacy_notice",
33 "legacy_unencumbered",
34 ],
35 license_text: [
36 "COPYING",
37 ],
38}
39
Dan Willemsen83b10fc2016-07-26 15:29:22 -070040cc_library {
41 name: "libexpat",
Vijay Venkatramanc4fc4e22017-05-15 12:52:35 -070042 vendor_available: true,
Justin Yun7855fac2020-11-11 16:17:04 +090043 product_available: true,
Justin Yunebe39312017-07-24 15:19:43 +090044 vndk: {
45 enabled: true,
46 },
Jooyung Han5ce2a592019-01-18 15:38:44 +090047 double_loadable: true,
Dan Willemsen83b10fc2016-07-26 15:29:22 -070048 host_supported: true,
49 unique_host_soname: true,
50 sdk_version: "9",
51
52 srcs: [
53 "lib/xmlparse.c",
54 "lib/xmlrole.c",
55 "lib/xmltok.c",
56 ],
57 cflags: [
58 "-Wall",
Chih-Hung Hsieh702000b2017-09-27 12:42:56 -070059 "-Werror",
Dan Willemsen83b10fc2016-07-26 15:29:22 -070060 "-Wmissing-prototypes",
61 "-Wstrict-prototypes",
Elliott Hughes72472942018-01-10 08:36:10 -080062 "-Wno-unused-function",
Dan Willemsen83b10fc2016-07-26 15:29:22 -070063 "-Wno-unused-parameter",
64 "-Wno-missing-field-initializers",
Dan Willemsen83b10fc2016-07-26 15:29:22 -070065 "-DHAVE_EXPAT_CONFIG_H",
Elliott Hughes72472942018-01-10 08:36:10 -080066 "-UWIN32_LEAN_AND_MEAN",
Dan Willemsen83b10fc2016-07-26 15:29:22 -070067 ],
68
69 target: {
70 darwin: {
71 cflags: ["-fno-common"],
72 },
73
74 windows: {
75 enabled: true,
76 },
77 },
78
Jooyung Han8be8e352019-06-25 00:12:01 +090079 stl: "none",
Dan Willemsen83b10fc2016-07-26 15:29:22 -070080 local_include_dirs: ["lib"],
81 export_include_dirs: ["lib"],
Jiyong Parka5c33ed2020-04-29 17:42:07 +090082
83 apex_available: [
84 "//apex_available:platform",
Martin Stjernholm39df8f42020-10-12 15:10:40 +010085 "com.android.art",
Jiyong Parka5c33ed2020-04-29 17:42:07 +090086 "com.android.art.debug",
87 ],
Nicolas Geoffrayd139f082021-03-03 22:04:27 +000088 min_sdk_version: "apex_inherit",
Dan Willemsen83b10fc2016-07-26 15:29:22 -070089}