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 | |
| 3 | libpcre2_dist_prefix = "dist2" |
| 4 | |
| 5 | libpcre2_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_dfa_match.c", |
| 11 | libpcre2_dist_prefix + "/src/pcre2_error.c", |
| 12 | libpcre2_dist_prefix + "/src/pcre2_find_bracket.c", |
| 13 | libpcre2_dist_prefix + "/src/pcre2_maketables.c", |
| 14 | libpcre2_dist_prefix + "/src/pcre2_match.c", |
| 15 | libpcre2_dist_prefix + "/src/pcre2_match_data.c", |
| 16 | libpcre2_dist_prefix + "/src/pcre2_jit_compile.c", |
| 17 | libpcre2_dist_prefix + "/src/pcre2_newline.c", |
| 18 | libpcre2_dist_prefix + "/src/pcre2_ord2utf.c", |
| 19 | libpcre2_dist_prefix + "/src/pcre2_pattern_info.c", |
| 20 | libpcre2_dist_prefix + "/src/pcre2_serialize.c", |
| 21 | libpcre2_dist_prefix + "/src/pcre2_string_utils.c", |
| 22 | libpcre2_dist_prefix + "/src/pcre2_study.c", |
| 23 | libpcre2_dist_prefix + "/src/pcre2_substitute.c", |
| 24 | libpcre2_dist_prefix + "/src/pcre2_substring.c", |
| 25 | libpcre2_dist_prefix + "/src/pcre2_tables.c", |
| 26 | libpcre2_dist_prefix + "/src/pcre2_ucd.c", |
| 27 | libpcre2_dist_prefix + "/src/pcre2_valid_utf.c", |
| 28 | libpcre2_dist_prefix + "/src/pcre2_xclass.c", |
| 29 | libpcre2_dist_prefix + "/src/pcre2_chartables.c", |
| 30 | ] |
| 31 | |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 32 | cc_defaults { |
| 33 | name: "pcre_defaults", |
Chih-Hung Hsieh | 6594554 | 2017-09-28 15:39:31 -0700 | [diff] [blame] | 34 | cflags: [ |
| 35 | "-DHAVE_CONFIG_H", |
| 36 | "-Wall", |
| 37 | "-Werror", |
| 38 | ], |
Chih-Hung Hsieh | 48eadb4 | 2017-08-09 15:30:45 -0700 | [diff] [blame] | 39 | tidy_checks: [ |
| 40 | "-google-build-using-namespace", |
| 41 | "-google-global-names-in-headers", |
| 42 | ], |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 43 | local_include_dirs: [ |
| 44 | "include_internal", |
| 45 | "include", |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 46 | ], |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 47 | export_include_dirs: ["include"], |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 48 | } |
| 49 | |
Elliott Hughes | f22fc77 | 2018-04-23 16:54:02 -0700 | [diff] [blame] | 50 | // |
| 51 | // libpcre2 |
| 52 | // |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 53 | |
| 54 | cc_library { |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 55 | name: "libpcre2", |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 56 | defaults: ["pcre_defaults"], |
| 57 | host_supported: true, |
Vijay Venkatraman | f60d843 | 2017-04-18 15:54:40 -0700 | [diff] [blame] | 58 | vendor_available: true, |
Justin Yun | cc36a0a | 2017-07-24 15:19:44 +0900 | [diff] [blame] | 59 | vndk: { |
| 60 | enabled: true, |
| 61 | }, |
Jiyong Park | 3bd078b | 2018-04-27 21:48:16 +0900 | [diff] [blame^] | 62 | recovery_available: true, |
Janis Danisevskis | 53e448c | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 63 | srcs: libpcre2_src_files, |
Dan Willemsen | 38109c9 | 2017-03-15 14:38:37 -0700 | [diff] [blame] | 64 | target: { |
| 65 | linux_bionic: { |
| 66 | enabled: true, |
| 67 | }, |
| 68 | }, |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 69 | } |
| 70 | |
Elliott Hughes | f22fc77 | 2018-04-23 16:54:02 -0700 | [diff] [blame] | 71 | // |
| 72 | // PCRE grep |
| 73 | // |
| 74 | |
| 75 | cc_defaults { |
| 76 | name: "grep_common", |
| 77 | defaults: ["pcre_defaults"], |
| 78 | srcs: [libpcre2_dist_prefix + "/src/pcre2grep.c"], |
| 79 | shared_libs: ["libpcre2"], |
| 80 | } |
| 81 | |
| 82 | cc_binary { |
| 83 | name: "grep", |
| 84 | defaults: ["grep_common"], |
| 85 | } |
| 86 | |
| 87 | cc_binary { |
| 88 | name: "grep_vendor", |
| 89 | defaults: ["grep_common"], |
| 90 | stem: "grep", |
| 91 | vendor: true, |
| 92 | } |
| 93 | |
| 94 | // |
| 95 | // Google's C++ wrapper. |
| 96 | // |
Dan Willemsen | 6692614 | 2016-07-19 19:34:54 -0700 | [diff] [blame] | 97 | |
Janis Danisevskis | 4c7d77a | 2016-04-01 12:25:25 +0100 | [diff] [blame] | 98 | cc_library_shared { |
| 99 | name: "libpcrecpp", |
Chih-Hung Hsieh | 6594554 | 2017-09-28 15:39:31 -0700 | [diff] [blame] | 100 | cflags: [ |
| 101 | "-Wall", |
| 102 | "-Werror", |
| 103 | "-Wno-unused-parameter", |
| 104 | "-Wno-unused-variable", |
| 105 | ], |
Chih-Hung Hsieh | 48eadb4 | 2017-08-09 15:30:45 -0700 | [diff] [blame] | 106 | tidy_checks: [ |
| 107 | "-google-build-using-namespace", |
| 108 | "-google-global-names-in-headers", |
| 109 | ], |
Janis Danisevskis | 4c7d77a | 2016-04-01 12:25:25 +0100 | [diff] [blame] | 110 | local_include_dirs: ["pcrecpp/include"], |
| 111 | shared_libs: ["libpcre2"], |
| 112 | export_include_dirs: [ |
| 113 | "pcrecpp/include", |
| 114 | "include", |
| 115 | ], |
| 116 | srcs: [ |
| 117 | "pcrecpp/pcrecpp.cc", |
| 118 | "pcrecpp/pcre_scanner.cc", |
| 119 | "pcrecpp/pcre_stringpiece.cc", |
| 120 | ], |
| 121 | } |