• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_pcre_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20    name: "external_pcre_license",
21    visibility: [":__subpackages__"],
22    license_kinds: [
23        "SPDX-license-identifier-BSD",
24        "SPDX-license-identifier-FSFAP",
25        "SPDX-license-identifier-MIT",
26        "legacy_notice",
27        "legacy_unencumbered",
28    ],
29    license_text: [
30        "NOTICE",
31    ],
32}
33
34cc_defaults {
35    name: "pcre_defaults",
36    cflags: [
37        "-DHAVE_CONFIG_H",
38        "-Wall",
39        "-Werror",
40        "-DPCRE2_CODE_UNIT_WIDTH=8",
41    ],
42    tidy_checks: [
43        "-google-build-using-namespace",
44        "-google-global-names-in-headers",
45    ],
46    local_include_dirs: [
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    product_available: true,
62    vndk: {
63        enabled: true,
64    },
65    double_loadable: true,
66    ramdisk_available: true,
67    vendor_ramdisk_available: true,
68    recovery_available: true,
69    srcs: [
70        "src/pcre2_auto_possess.c",
71        "src/pcre2_compile.c",
72        "src/pcre2_config.c",
73        "src/pcre2_context.c",
74        "src/pcre2_convert.c",
75        "src/pcre2_dfa_match.c",
76        "src/pcre2_error.c",
77        "src/pcre2_extuni.c",
78        "src/pcre2_find_bracket.c",
79        "src/pcre2_maketables.c",
80        "src/pcre2_match.c",
81        "src/pcre2_match_data.c",
82        "src/pcre2_jit_compile.c",
83        "src/pcre2_newline.c",
84        "src/pcre2_ord2utf.c",
85        "src/pcre2_pattern_info.c",
86        "src/pcre2_script_run.c",
87        "src/pcre2_serialize.c",
88        "src/pcre2_string_utils.c",
89        "src/pcre2_study.c",
90        "src/pcre2_substitute.c",
91        "src/pcre2_substring.c",
92        "src/pcre2_tables.c",
93        "src/pcre2_ucd.c",
94        "src/pcre2_valid_utf.c",
95        "src/pcre2_xclass.c",
96        "src/pcre2_chartables.c",
97    ],
98    stl: "none",
99    target: {
100        bionic: {
101            system_shared_libs: ["libc"],
102        },
103        linux_bionic: {
104            enabled: true,
105        },
106    },
107}
108