blob: f94feb0e2a1caa11f83c361fdabbd3ff096e99cd [file] [log] [blame]
Dan Willemsen66926142016-07-19 19:34:54 -07001
Janis Danisevskis53e448c2016-03-31 13:35:25 +01002
Bob Badoure3626cd2021-02-12 15:27:36 -08003package {
4 default_applicable_licenses: ["external_pcre_license"],
5}
6
7// Added automatically by a large-scale-change that took the approach of
8// 'apply every license found to every target'. While this makes sure we respect
9// every license restriction, it may not be entirely correct.
10//
11// e.g. GPL in an MIT project might only apply to the contrib/ directory.
12//
13// Please consider splitting the single license below into multiple licenses,
14// taking care not to lose any license_kind information, and overriding the
15// default license using the 'licenses: [...]' property on targets as needed.
16//
17// For unused files, consider creating a 'fileGroup' with "//visibility:private"
18// to attach the license to, and including a comment whether the files may be
19// used in the current project.
20// See: http://go/android-license-faq
21license {
22 name: "external_pcre_license",
23 visibility: [":__subpackages__"],
24 license_kinds: [
25 "SPDX-license-identifier-BSD",
26 "SPDX-license-identifier-FSFAP",
27 "SPDX-license-identifier-MIT",
28 "legacy_notice",
29 "legacy_unencumbered",
30 ],
31 license_text: [
32 "NOTICE",
33 ],
34}
35
Janis Danisevskis53e448c2016-03-31 13:35:25 +010036libpcre2_dist_prefix = "dist2"
37
38libpcre2_src_files = [
39 libpcre2_dist_prefix + "/src/pcre2_auto_possess.c",
40 libpcre2_dist_prefix + "/src/pcre2_compile.c",
41 libpcre2_dist_prefix + "/src/pcre2_config.c",
42 libpcre2_dist_prefix + "/src/pcre2_context.c",
Elliott Hughes9bc971b2018-07-27 13:23:14 -070043 libpcre2_dist_prefix + "/src/pcre2_convert.c",
Janis Danisevskis53e448c2016-03-31 13:35:25 +010044 libpcre2_dist_prefix + "/src/pcre2_dfa_match.c",
45 libpcre2_dist_prefix + "/src/pcre2_error.c",
Elliott Hughes9bc971b2018-07-27 13:23:14 -070046 libpcre2_dist_prefix + "/src/pcre2_extuni.c",
Janis Danisevskis53e448c2016-03-31 13:35:25 +010047 libpcre2_dist_prefix + "/src/pcre2_find_bracket.c",
48 libpcre2_dist_prefix + "/src/pcre2_maketables.c",
49 libpcre2_dist_prefix + "/src/pcre2_match.c",
50 libpcre2_dist_prefix + "/src/pcre2_match_data.c",
51 libpcre2_dist_prefix + "/src/pcre2_jit_compile.c",
52 libpcre2_dist_prefix + "/src/pcre2_newline.c",
53 libpcre2_dist_prefix + "/src/pcre2_ord2utf.c",
54 libpcre2_dist_prefix + "/src/pcre2_pattern_info.c",
Elliott Hughes0c26e192019-08-07 12:24:46 -070055 libpcre2_dist_prefix + "/src/pcre2_script_run.c",
Janis Danisevskis53e448c2016-03-31 13:35:25 +010056 libpcre2_dist_prefix + "/src/pcre2_serialize.c",
57 libpcre2_dist_prefix + "/src/pcre2_string_utils.c",
58 libpcre2_dist_prefix + "/src/pcre2_study.c",
59 libpcre2_dist_prefix + "/src/pcre2_substitute.c",
60 libpcre2_dist_prefix + "/src/pcre2_substring.c",
61 libpcre2_dist_prefix + "/src/pcre2_tables.c",
62 libpcre2_dist_prefix + "/src/pcre2_ucd.c",
63 libpcre2_dist_prefix + "/src/pcre2_valid_utf.c",
64 libpcre2_dist_prefix + "/src/pcre2_xclass.c",
65 libpcre2_dist_prefix + "/src/pcre2_chartables.c",
66]
67
Dan Willemsen66926142016-07-19 19:34:54 -070068cc_defaults {
69 name: "pcre_defaults",
Chih-Hung Hsieh65945542017-09-28 15:39:31 -070070 cflags: [
71 "-DHAVE_CONFIG_H",
72 "-Wall",
73 "-Werror",
74 ],
Chih-Hung Hsieh48eadb42017-08-09 15:30:45 -070075 tidy_checks: [
76 "-google-build-using-namespace",
77 "-google-global-names-in-headers",
78 ],
Janis Danisevskis53e448c2016-03-31 13:35:25 +010079 local_include_dirs: [
80 "include_internal",
81 "include",
Dan Willemsen66926142016-07-19 19:34:54 -070082 ],
Janis Danisevskis53e448c2016-03-31 13:35:25 +010083 export_include_dirs: ["include"],
Dan Willemsen66926142016-07-19 19:34:54 -070084}
85
Elliott Hughesf22fc772018-04-23 16:54:02 -070086//
87// libpcre2
88//
Dan Willemsen66926142016-07-19 19:34:54 -070089
90cc_library {
Janis Danisevskis53e448c2016-03-31 13:35:25 +010091 name: "libpcre2",
Dan Willemsen66926142016-07-19 19:34:54 -070092 defaults: ["pcre_defaults"],
93 host_supported: true,
Vijay Venkatramanf60d8432017-04-18 15:54:40 -070094 vendor_available: true,
Justin Yunbb67f692020-11-11 18:21:56 +090095 product_available: true,
Justin Yuncc36a0a2017-07-24 15:19:44 +090096 vndk: {
97 enabled: true,
98 },
Jooyung Han6cfbb072019-01-18 15:43:40 +090099 double_loadable: true,
Yifan Honga3c4a4a2020-10-21 18:43:09 -0700100 ramdisk_available: true,
101 vendor_ramdisk_available: true,
Jiyong Park3bd078b2018-04-27 21:48:16 +0900102 recovery_available: true,
Janis Danisevskis53e448c2016-03-31 13:35:25 +0100103 srcs: libpcre2_src_files,
Elliott Hughes1f261d02019-09-24 12:09:12 -0700104 stl: "none",
105 system_shared_libs: ["libc"],
Dan Willemsen38109c92017-03-15 14:38:37 -0700106 target: {
107 linux_bionic: {
108 enabled: true,
109 },
110 },
Dan Willemsen66926142016-07-19 19:34:54 -0700111}