• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
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",
10    libpcre2_dist_prefix + "/src/pcre2_convert.c",
11    libpcre2_dist_prefix + "/src/pcre2_dfa_match.c",
12    libpcre2_dist_prefix + "/src/pcre2_error.c",
13    libpcre2_dist_prefix + "/src/pcre2_extuni.c",
14    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
34cc_defaults {
35    name: "pcre_defaults",
36    cflags: [
37        "-DHAVE_CONFIG_H",
38        "-Wall",
39        "-Werror",
40    ],
41    tidy_checks: [
42        "-google-build-using-namespace",
43        "-google-global-names-in-headers",
44    ],
45    local_include_dirs: [
46        "include_internal",
47        "include",
48    ],
49    export_include_dirs: ["include"],
50}
51
52//
53// libpcre2
54//
55
56cc_library {
57    name: "libpcre2",
58    defaults: ["pcre_defaults"],
59    host_supported: true,
60    vendor_available: true,
61    vndk: {
62        enabled: true,
63    },
64    double_loadable: true,
65    recovery_available: true,
66    srcs: libpcre2_src_files,
67    target: {
68        linux_bionic: {
69            enabled: true,
70        },
71    },
72}
73
74
75//
76// Google's C++ wrapper.
77//
78
79cc_library_shared {
80    name: "libpcrecpp",
81    cflags: [
82        "-Wall",
83        "-Werror",
84        "-Wno-unused-parameter",
85        "-Wno-unused-variable",
86    ],
87    tidy_checks: [
88        "-google-build-using-namespace",
89        "-google-global-names-in-headers",
90    ],
91    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}
103