Colin Cross | f55cbaf | 2018-09-11 15:45:18 -0700 | [diff] [blame] | 1 | // Copyright (C) 2017 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | // |
| 15 | |
Bob Badour | 58dd9b2 | 2021-02-12 17:18:47 -0800 | [diff] [blame] | 16 | package { |
| 17 | default_applicable_licenses: ["external_brotli_license"], |
| 18 | } |
| 19 | |
| 20 | // Added automatically by a large-scale-change that took the approach of |
| 21 | // 'apply every license found to every target'. While this makes sure we respect |
| 22 | // every license restriction, it may not be entirely correct. |
| 23 | // |
| 24 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 25 | // |
| 26 | // Please consider splitting the single license below into multiple licenses, |
| 27 | // taking care not to lose any license_kind information, and overriding the |
| 28 | // default license using the 'licenses: [...]' property on targets as needed. |
| 29 | // |
| 30 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 31 | // to attach the license to, and including a comment whether the files may be |
| 32 | // used in the current project. |
| 33 | // See: http://go/android-license-faq |
| 34 | license { |
| 35 | name: "external_brotli_license", |
| 36 | visibility: [":__subpackages__"], |
| 37 | license_kinds: [ |
| 38 | "SPDX-license-identifier-BSD", |
| 39 | "SPDX-license-identifier-MIT", |
| 40 | "SPDX-license-identifier-Unlicense", |
| 41 | "legacy_permissive", |
| 42 | "legacy_unencumbered", |
| 43 | ], |
| 44 | license_text: [ |
| 45 | "LICENSE", |
| 46 | ], |
| 47 | } |
| 48 | |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 49 | cc_library_static { |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 50 | name: "libbrotli", |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 51 | host_supported: true, |
Bill Peckham | 2254e7c | 2019-09-17 16:46:36 -0700 | [diff] [blame] | 52 | vendor_available: true, |
Dan Willemsen | 76c2952 | 2018-10-23 13:40:03 -0700 | [diff] [blame] | 53 | recovery_available: true, |
David Anderson | 46a3400 | 2020-09-10 18:19:39 -0700 | [diff] [blame] | 54 | ramdisk_available: true, |
David Anderson | 557ef16 | 2020-11-16 18:49:33 -0800 | [diff] [blame] | 55 | vendor_ramdisk_available: true, |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 56 | |
Josh Gao | ced742f | 2020-03-25 17:00:44 -0700 | [diff] [blame] | 57 | apex_available: [ |
| 58 | "//apex_available:platform", |
| 59 | "com.android.adbd", |
| 60 | ], |
| 61 | |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 62 | visibility: [ |
| 63 | "//bootable/recovery:__subpackages__", |
| 64 | "//external/bsdiff:__subpackages__", |
| 65 | "//external/puffin:__subpackages__", |
Baligh Uddin | 43a62ef | 2020-10-18 14:59:50 +0000 | [diff] [blame] | 66 | "//packages/modules/adb:__subpackages__", |
David Anderson | fb83493 | 2020-08-06 13:59:11 -0700 | [diff] [blame] | 67 | "//system/core/fs_mgr/libsnapshot:__subpackages__", |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 68 | "//system/update_engine:__subpackages__", |
| 69 | ], |
| 70 | |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 71 | cflags: [ |
| 72 | "-Werror", |
| 73 | "-O2", |
| 74 | ], |
Alex Deymo | 0611715 | 2017-11-09 20:25:41 +0100 | [diff] [blame] | 75 | export_include_dirs: ["c/include"], |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 76 | srcs: [ |
Alex Deymo | 0611715 | 2017-11-09 20:25:41 +0100 | [diff] [blame] | 77 | "c/common/*.c", |
| 78 | "c/dec/*.c", |
| 79 | "c/enc/*.c", |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 80 | ], |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 81 | target: { |
| 82 | linux_bionic: { |
| 83 | enabled: true, |
| 84 | }, |
Josh Gao | ced742f | 2020-03-25 17:00:44 -0700 | [diff] [blame] | 85 | windows: { |
| 86 | enabled: true, |
| 87 | }, |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 88 | }, |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 89 | stl: "none", |
| 90 | } |
| 91 | |
| 92 | cc_binary { |
Alex Deymo | 0611715 | 2017-11-09 20:25:41 +0100 | [diff] [blame] | 93 | name: "brotli", |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 94 | host_supported: true, |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 95 | cflags: ["-Werror"], |
Alex Deymo | 0611715 | 2017-11-09 20:25:41 +0100 | [diff] [blame] | 96 | srcs: ["c/tools/brotli.c"], |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 97 | target: { |
| 98 | linux_bionic: { |
| 99 | enabled: true, |
| 100 | }, |
| 101 | }, |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 102 | static_libs: ["libbrotli"], |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 103 | } |
Colin Cross | f55cbaf | 2018-09-11 15:45:18 -0700 | [diff] [blame] | 104 | |
| 105 | // |
| 106 | // Support for brotli in java code. |
| 107 | // |
| 108 | |
| 109 | java_library { |
| 110 | name: "brotli-java", |
| 111 | host_supported: true, |
| 112 | hostdex: true, |
| 113 | srcs: ["java/**/*.java"], |
| 114 | exclude_srcs: ["java/**/*Test.java"], |
Jeff Sharkey | 1ac7fc6 | 2018-10-02 10:57:12 -0600 | [diff] [blame] | 115 | sdk_version: "current", |
Colin Cross | f55cbaf | 2018-09-11 15:45:18 -0700 | [diff] [blame] | 116 | } |
Branden Archer | 238bb16 | 2020-10-31 23:04:21 -0700 | [diff] [blame] | 117 | |
| 118 | // TODO(b/171429704): Remove this genrule and use the fuzz_data.zip |
| 119 | // directly in brotli-fuzzer when a corpus_zip option is available. |
| 120 | genrule { |
| 121 | name: "brotli-fuzzer-corpus", |
| 122 | srcs: ["java/org/brotli/integration/fuzz_data.zip"], |
| 123 | cmd: "mkdir -p $(genDir)/c/fuzz && " + |
| 124 | "unzip -q $(in) -d $(genDir)/c/fuzz", |
| 125 | out: [ |
| 126 | "c/fuzz/04bdd9f35a2881027adddb039026623cd2e86664", |
| 127 | "c/fuzz/04dc2c1dc1f4612d4dc4892f4444983f2064c252", |
| 128 | "c/fuzz/05a79f06cf3f67f726dae68d18a2290f6c9a50c9", |
| 129 | "c/fuzz/05b3606442abab241ede01c3b34d1d73afc580d1", |
| 130 | "c/fuzz/065977e9fc84bab81eada79880b4481fece00616", |
| 131 | "c/fuzz/08e61f98cc5e260e8d9b853bf9d5c1d9c7a9fc4d", |
| 132 | "c/fuzz/155b07e636d98a80a53e667caef9e11370cef995", |
| 133 | "c/fuzz/2ad192eab5c0f6e50f0c64777811ae9111bad918", |
| 134 | "c/fuzz/2b1cba1e32deab80f440d886d1be7ca43733e878", |
| 135 | "c/fuzz/2fe9bc36724f80651a75cde84233a4832afec947", |
| 136 | "c/fuzz/312287bfd6732b264b54f9d5eda69f79c73898da", |
| 137 | "c/fuzz/3254df93e6003641dfc55522f594335e2c871b8f", |
| 138 | "c/fuzz/35a8db906eb1834b8acefd0bb9236ab8dc2ebbfe", |
| 139 | "c/fuzz/3a8e0fefadd562f706a16ec84c67646ba7ddcf29", |
| 140 | "c/fuzz/3edbdb6fcdb1ff53428af36bc4982f4611303eae", |
| 141 | "c/fuzz/477f2aa9b6ca0ff2ef72365d227baabb4855646e", |
| 142 | "c/fuzz/49fab0752d21ca89e4da04bdbb86dc7abb6b77e9", |
| 143 | "c/fuzz/4b809bfcd95342116053b0c057c878f08c1178b9", |
| 144 | "c/fuzz/523dfcdc31b2cb3b0f4715faa2be89b3d0a1d373", |
| 145 | "c/fuzz/54fd1711209fb1c0781092374132c66e79e2241b", |
| 146 | "c/fuzz/5515e03743624befa68a626382b605829300448d", |
| 147 | "c/fuzz/5be2ace579d7b0d816c31db7e65dc3245f1e09a6", |
| 148 | "c/fuzz/6f672b1c3c8643ce5083f6efee790b29459cbb47", |
| 149 | "c/fuzz/6fb6157dc83d29ef5d4da645e4a078179f54f405", |
| 150 | "c/fuzz/70eaba097fdbde0c63159f194ec4cec0f201acd8", |
| 151 | "c/fuzz/725ce4c76aa864430d7f4cae9e4cc4fbdd889f5e", |
| 152 | "c/fuzz/73231c6592f195ffd41100b8706d1138ff6893b9", |
| 153 | "c/fuzz/754f38420c156404309fa05f1ed773be47336882", |
| 154 | "c/fuzz/7730f322fb995dd3495d6e69906ff1f5b3cd876f", |
| 155 | "c/fuzz/7b74620c59451546866d80c0629ec01221246f59", |
| 156 | "c/fuzz/7b9cde6a96a7446f6951cca66266284db28be916", |
| 157 | "c/fuzz/7cc01983b79447178179e59af8a56cf4f45b9f8f", |
| 158 | "c/fuzz/7d3783cb4414c6098f7ac49ebaa8d2122eb06a0e", |
| 159 | "c/fuzz/7ecfeb33839bb8cea5027eb9fc7e5689799e704c", |
| 160 | "c/fuzz/7f88ed32938bef52eeaf3d3defedbfd2df87f895", |
| 161 | "c/fuzz/90450c570b868c4db80473b978529f6ec6dde20d", |
| 162 | "c/fuzz/9590340f604e5c729dbf8b54e25715fd18adb318", |
| 163 | "c/fuzz/a3491e5bbd78932592cd02dbff09cd05ca36e2e9", |
| 164 | "c/fuzz/a848e83a76d026b01bdfc2c0a6ac841564a97347", |
| 165 | "c/fuzz/a8abd012eb59b862bf9bc1ea443d2f35a1a2e222", |
| 166 | "c/fuzz/abcaee2817f06af41383c41a7e0920f1cc5a14ec", |
| 167 | "c/fuzz/ac81161dd772b1c7a47aa5cefed1ec3d8ac442af", |
| 168 | "c/fuzz/aec354d02df9ddb8d4e9ebb0c2771f1325cc2b89", |
| 169 | "c/fuzz/c01afbfde5a6ff0e5b0873f9d1ab8742293a375e", |
| 170 | "c/fuzz/c18cc3b3c69a07404a2c3cc756ed2d18f3dd4348", |
| 171 | "c/fuzz/c46fa7f0b56a80fcf8b1a8a6cbc24e4139b59a6b", |
| 172 | "c/fuzz/c51ab436e7332470ea2fd3d68ddbc3d0c43cf7ea", |
| 173 | "c/fuzz/c95701b41f06e892874d3001b32c64510c33c178", |
| 174 | "c/fuzz/d2b552c1f35b645332e7f63dea404046fdc8577b", |
| 175 | "c/fuzz/d6b5b93e87be7082e917d4bcc4d3436f34978d4b", |
| 176 | "c/fuzz/d75a03333816807599eadcb043a298ffa8c83378", |
| 177 | "c/fuzz/da39a3ee5e6b4b0d3255bfef95601890afd80709", |
| 178 | "c/fuzz/dc37d2e46439be3aa4bf23102f0960adbf13aae1", |
| 179 | "c/fuzz/de7c798e9523bd7e8350f3a391248cc9700bc4b4", |
| 180 | "c/fuzz/e1346339b452f86470a562335958bb6729f66bb2", |
| 181 | "c/fuzz/e6d0943f26000ee2306f10b1c1d44ab23619b20a", |
| 182 | "c/fuzz/ed22dce9884f67e05bcc082ba9b11424cf6e0449", |
| 183 | "c/fuzz/f5c1dc2f4906adb429197a011692b71bc1db856a", |
| 184 | "c/fuzz/fb1d6415c35cf9d7807e05e14179537e2019e635", |
| 185 | ], |
| 186 | } |
| 187 | |
| 188 | cc_fuzz { |
| 189 | name: "brotli-fuzzer", |
| 190 | static_libs: ["libbrotli"], |
| 191 | srcs: ["c/fuzz/decode_fuzzer.c"], |
| 192 | corpus: [":brotli-fuzzer-corpus"], |
Branden Archer | f69b4ab | 2020-11-12 20:03:18 -0800 | [diff] [blame] | 193 | fuzz_config: { |
| 194 | componentid: 128577 |
| 195 | }, |
Branden Archer | 238bb16 | 2020-10-31 23:04:21 -0700 | [diff] [blame] | 196 | } |