Dan Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 1 | // 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 Badour | 2807050 | 2021-02-12 18:39:07 -0800 | [diff] [blame] | 4 | // *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE |
| 5 | // CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE |
| 6 | // DEPENDING ON IT IN YOUR PROJECT. *** |
| 7 | package { |
| 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 |
| 25 | license { |
| 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 Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 40 | cc_library { |
| 41 | name: "libexpat", |
Vijay Venkatraman | c4fc4e2 | 2017-05-15 12:52:35 -0700 | [diff] [blame] | 42 | vendor_available: true, |
Justin Yun | 7855fac | 2020-11-11 16:17:04 +0900 | [diff] [blame] | 43 | product_available: true, |
Justin Yun | ebe3931 | 2017-07-24 15:19:43 +0900 | [diff] [blame] | 44 | vndk: { |
| 45 | enabled: true, |
| 46 | }, |
Jooyung Han | 5ce2a59 | 2019-01-18 15:38:44 +0900 | [diff] [blame] | 47 | double_loadable: true, |
Dan Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 48 | 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 Hsieh | 702000b | 2017-09-27 12:42:56 -0700 | [diff] [blame] | 59 | "-Werror", |
Dan Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 60 | "-Wmissing-prototypes", |
| 61 | "-Wstrict-prototypes", |
Elliott Hughes | 7247294 | 2018-01-10 08:36:10 -0800 | [diff] [blame] | 62 | "-Wno-unused-function", |
Dan Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 63 | "-Wno-unused-parameter", |
| 64 | "-Wno-missing-field-initializers", |
Dan Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 65 | "-DHAVE_EXPAT_CONFIG_H", |
Elliott Hughes | 7247294 | 2018-01-10 08:36:10 -0800 | [diff] [blame] | 66 | "-UWIN32_LEAN_AND_MEAN", |
Elliott Hughes | f898dc2 | 2022-02-23 17:34:51 -0800 | [diff] [blame] | 67 | // As of 2.4.6, xmlparse.c includes expat_config.h *before* including |
| 68 | // any system header file, meaning that __BIONIC__ and __GLIBC__ and so |
| 69 | // on aren't set, but our modifications to have one expat_config.h for |
| 70 | // all targets rely on those defines. |
| 71 | "-include stdio.h", |
Dan Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 72 | ], |
| 73 | |
| 74 | target: { |
| 75 | darwin: { |
| 76 | cflags: ["-fno-common"], |
| 77 | }, |
Dan Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 78 | windows: { |
| 79 | enabled: true, |
| 80 | }, |
| 81 | }, |
| 82 | |
Jooyung Han | 8be8e35 | 2019-06-25 00:12:01 +0900 | [diff] [blame] | 83 | stl: "none", |
Dan Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 84 | local_include_dirs: ["lib"], |
| 85 | export_include_dirs: ["lib"], |
Jiyong Park | a5c33ed | 2020-04-29 17:42:07 +0900 | [diff] [blame] | 86 | |
| 87 | apex_available: [ |
| 88 | "//apex_available:platform", |
Martin Stjernholm | 39df8f4 | 2020-10-12 15:10:40 +0100 | [diff] [blame] | 89 | "com.android.art", |
Jiyong Park | a5c33ed | 2020-04-29 17:42:07 +0900 | [diff] [blame] | 90 | "com.android.art.debug", |
| 91 | ], |
Nicolas Geoffray | d139f08 | 2021-03-03 22:04:27 +0000 | [diff] [blame] | 92 | min_sdk_version: "apex_inherit", |
Dan Willemsen | 83b10fc | 2016-07-26 15:29:22 -0700 | [diff] [blame] | 93 | } |