Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 1 | |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 2 | |
Bob Badour | e3626cd | 2021-02-12 15:27:36 -0800 | [diff] [blame^] | 3 | package { |
| 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 |
| 21 | license { |
| 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 Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 36 | libpcre2_dist_prefix = "dist2" |
| 37 | |
| 38 | libpcre2_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 Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 43 | libpcre2_dist_prefix + "/src/pcre2_convert.c", |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 44 | libpcre2_dist_prefix + "/src/pcre2_dfa_match.c", |
| 45 | libpcre2_dist_prefix + "/src/pcre2_error.c", |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 46 | libpcre2_dist_prefix + "/src/pcre2_extuni.c", |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 47 | 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 Hughes | 0c26e19 | 2019-08-07 12:24:46 -0700 | [diff] [blame] | 55 | libpcre2_dist_prefix + "/src/pcre2_script_run.c", |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 56 | 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 Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 68 | cc_defaults { |
| 69 | name: "pcre_defaults", |
Chih-Hung Hsieh | 6594554 | 2017-09-28 15:39:31 -0700 | [diff] [blame] | 70 | cflags: [ |
| 71 | "-DHAVE_CONFIG_H", |
| 72 | "-Wall", |
| 73 | "-Werror", |
| 74 | ], |
Chih-Hung Hsieh | 48eadb4 | 2017-08-09 15:30:45 -0700 | [diff] [blame] | 75 | tidy_checks: [ |
| 76 | "-google-build-using-namespace", |
| 77 | "-google-global-names-in-headers", |
| 78 | ], |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 79 | local_include_dirs: [ |
| 80 | "include_internal", |
| 81 | "include", |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 82 | ], |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 83 | export_include_dirs: ["include"], |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 84 | } |
| 85 | |
Elliott Hughes | f22fc77 | 2018-04-23 16:54:02 -0700 | [diff] [blame] | 86 | // |
| 87 | // libpcre2 |
| 88 | // |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 89 | |
| 90 | cc_library { |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 91 | name: "libpcre2", |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 92 | defaults: ["pcre_defaults"], |
| 93 | host_supported: true, |
Vijay Venkatraman | f60d843 | 2017-04-18 15:54:40 -0700 | [diff] [blame] | 94 | vendor_available: true, |
Justin Yun | bb67f69 | 2020-11-11 18:21:56 +0900 | [diff] [blame] | 95 | product_available: true, |
Justin Yun | cc36a0a | 2017-07-24 15:19:44 +0900 | [diff] [blame] | 96 | vndk: { |
| 97 | enabled: true, |
| 98 | }, |
Jooyung Han | 6cfbb07 | 2019-01-18 15:43:40 +0900 | [diff] [blame] | 99 | double_loadable: true, |
Yifan Hong | a3c4a4a | 2020-10-21 18:43:09 -0700 | [diff] [blame] | 100 | ramdisk_available: true, |
| 101 | vendor_ramdisk_available: true, |
Jiyong Park | 3bd078b | 2018-04-27 21:48:16 +0900 | [diff] [blame] | 102 | recovery_available: true, |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 103 | srcs: libpcre2_src_files, |
Elliott Hughes | 1f261d0 | 2019-09-24 12:09:12 -0700 | [diff] [blame] | 104 | stl: "none", |
| 105 | system_shared_libs: ["libc"], |
Dan Willemsen | 38109c9 | 2017-03-15 14:38:37 -0700 | [diff] [blame] | 106 | target: { |
| 107 | linux_bionic: { |
| 108 | enabled: true, |
| 109 | }, |
| 110 | }, |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 111 | } |