blob: 45d9065661a5829e31cd26cee29a2e8531fe58f8 [file] [log] [blame]
Dan Willemsen66926142016-07-19 19:34:54 -07001
Janis Danisevskis53e448c2016-03-31 13:35:25 +01002
3libpcre2_dist_prefix = "dist2"
4
5libpcre2_src_files = [
6 libpcre2_dist_prefix + "/src/pcre2_auto_possess.c",
7 libpcre2_dist_prefix + "/src/pcre2_compile.c",
8 libpcre2_dist_prefix + "/src/pcre2_config.c",
9 libpcre2_dist_prefix + "/src/pcre2_context.c",
Elliott Hughes9bc971b2018-07-27 13:23:14 -070010 libpcre2_dist_prefix + "/src/pcre2_convert.c",
Janis Danisevskis53e448c2016-03-31 13:35:25 +010011 libpcre2_dist_prefix + "/src/pcre2_dfa_match.c",
12 libpcre2_dist_prefix + "/src/pcre2_error.c",
Elliott Hughes9bc971b2018-07-27 13:23:14 -070013 libpcre2_dist_prefix + "/src/pcre2_extuni.c",
Janis Danisevskis53e448c2016-03-31 13:35:25 +010014 libpcre2_dist_prefix + "/src/pcre2_find_bracket.c",
15 libpcre2_dist_prefix + "/src/pcre2_maketables.c",
16 libpcre2_dist_prefix + "/src/pcre2_match.c",
17 libpcre2_dist_prefix + "/src/pcre2_match_data.c",
18 libpcre2_dist_prefix + "/src/pcre2_jit_compile.c",
19 libpcre2_dist_prefix + "/src/pcre2_newline.c",
20 libpcre2_dist_prefix + "/src/pcre2_ord2utf.c",
21 libpcre2_dist_prefix + "/src/pcre2_pattern_info.c",
22 libpcre2_dist_prefix + "/src/pcre2_serialize.c",
23 libpcre2_dist_prefix + "/src/pcre2_string_utils.c",
24 libpcre2_dist_prefix + "/src/pcre2_study.c",
25 libpcre2_dist_prefix + "/src/pcre2_substitute.c",
26 libpcre2_dist_prefix + "/src/pcre2_substring.c",
27 libpcre2_dist_prefix + "/src/pcre2_tables.c",
28 libpcre2_dist_prefix + "/src/pcre2_ucd.c",
29 libpcre2_dist_prefix + "/src/pcre2_valid_utf.c",
30 libpcre2_dist_prefix + "/src/pcre2_xclass.c",
31 libpcre2_dist_prefix + "/src/pcre2_chartables.c",
32]
33
Dan Willemsen66926142016-07-19 19:34:54 -070034cc_defaults {
35 name: "pcre_defaults",
Chih-Hung Hsieh65945542017-09-28 15:39:31 -070036 cflags: [
37 "-DHAVE_CONFIG_H",
38 "-Wall",
39 "-Werror",
40 ],
Chih-Hung Hsieh48eadb42017-08-09 15:30:45 -070041 tidy_checks: [
42 "-google-build-using-namespace",
43 "-google-global-names-in-headers",
44 ],
Janis Danisevskis53e448c2016-03-31 13:35:25 +010045 local_include_dirs: [
46 "include_internal",
47 "include",
Dan Willemsen66926142016-07-19 19:34:54 -070048 ],
Janis Danisevskis53e448c2016-03-31 13:35:25 +010049 export_include_dirs: ["include"],
Dan Willemsen66926142016-07-19 19:34:54 -070050}
51
Elliott Hughesf22fc772018-04-23 16:54:02 -070052//
53// libpcre2
54//
Dan Willemsen66926142016-07-19 19:34:54 -070055
56cc_library {
Janis Danisevskis53e448c2016-03-31 13:35:25 +010057 name: "libpcre2",
Dan Willemsen66926142016-07-19 19:34:54 -070058 defaults: ["pcre_defaults"],
59 host_supported: true,
Vijay Venkatramanf60d8432017-04-18 15:54:40 -070060 vendor_available: true,
Justin Yuncc36a0a2017-07-24 15:19:44 +090061 vndk: {
62 enabled: true,
63 },
Jooyung Han6cfbb072019-01-18 15:43:40 +090064 double_loadable: true,
Jiyong Park3bd078b2018-04-27 21:48:16 +090065 recovery_available: true,
Janis Danisevskis53e448c2016-03-31 13:35:25 +010066 srcs: libpcre2_src_files,
Dan Willemsen38109c92017-03-15 14:38:37 -070067 target: {
68 linux_bionic: {
69 enabled: true,
70 },
71 },
Dan Willemsen66926142016-07-19 19:34:54 -070072}
73
Elliott Hughesf22fc772018-04-23 16:54:02 -070074
75//
76// Google's C++ wrapper.
77//
Dan Willemsen66926142016-07-19 19:34:54 -070078
Janis Danisevskis4c7d77a2016-04-01 12:25:25 +010079cc_library_shared {
80 name: "libpcrecpp",
Chih-Hung Hsieh65945542017-09-28 15:39:31 -070081 cflags: [
82 "-Wall",
83 "-Werror",
84 "-Wno-unused-parameter",
85 "-Wno-unused-variable",
86 ],
Chih-Hung Hsieh48eadb42017-08-09 15:30:45 -070087 tidy_checks: [
88 "-google-build-using-namespace",
89 "-google-global-names-in-headers",
90 ],
Janis Danisevskis4c7d77a2016-04-01 12:25:25 +010091 local_include_dirs: ["pcrecpp/include"],
92 shared_libs: ["libpcre2"],
93 export_include_dirs: [
94 "pcrecpp/include",
95 "include",
96 ],
97 srcs: [
98 "pcrecpp/pcrecpp.cc",
99 "pcrecpp/pcre_scanner.cc",
100 "pcrecpp/pcre_stringpiece.cc",
101 ],
102}