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 | |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 16 | cc_library_static { |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 17 | name: "libbrotli", |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 18 | host_supported: true, |
Bill Peckham | 2254e7c | 2019-09-17 16:46:36 -0700 | [diff] [blame] | 19 | vendor_available: true, |
Dan Willemsen | 76c2952 | 2018-10-23 13:40:03 -0700 | [diff] [blame] | 20 | recovery_available: true, |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 21 | |
Josh Gao | 47a0988 | 2020-03-25 17:00:44 -0700 | [diff] [blame] | 22 | apex_available: [ |
| 23 | "//apex_available:platform", |
| 24 | "com.android.adbd", |
| 25 | ], |
| 26 | |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 27 | visibility: [ |
| 28 | "//bootable/recovery:__subpackages__", |
| 29 | "//external/bsdiff:__subpackages__", |
| 30 | "//external/puffin:__subpackages__", |
Josh Gao | 47a0988 | 2020-03-25 17:00:44 -0700 | [diff] [blame] | 31 | "//system/core/adb:__subpackages__", |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 32 | "//system/update_engine:__subpackages__", |
| 33 | ], |
| 34 | |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 35 | cflags: [ |
| 36 | "-Werror", |
| 37 | "-O2", |
| 38 | ], |
Alex Deymo | 0611715 | 2017-11-09 20:25:41 +0100 | [diff] [blame] | 39 | export_include_dirs: ["c/include"], |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 40 | srcs: [ |
Alex Deymo | 0611715 | 2017-11-09 20:25:41 +0100 | [diff] [blame] | 41 | "c/common/*.c", |
| 42 | "c/dec/*.c", |
| 43 | "c/enc/*.c", |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 44 | ], |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 45 | target: { |
| 46 | linux_bionic: { |
| 47 | enabled: true, |
| 48 | }, |
Josh Gao | 47a0988 | 2020-03-25 17:00:44 -0700 | [diff] [blame] | 49 | windows: { |
| 50 | enabled: true, |
| 51 | }, |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 52 | }, |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 53 | stl: "none", |
| 54 | } |
| 55 | |
| 56 | cc_binary { |
Alex Deymo | 0611715 | 2017-11-09 20:25:41 +0100 | [diff] [blame] | 57 | name: "brotli", |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 58 | host_supported: true, |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 59 | cflags: ["-Werror"], |
Alex Deymo | 0611715 | 2017-11-09 20:25:41 +0100 | [diff] [blame] | 60 | srcs: ["c/tools/brotli.c"], |
Tianjie Xu | efe8152 | 2017-07-06 15:35:29 -0700 | [diff] [blame] | 61 | target: { |
| 62 | linux_bionic: { |
| 63 | enabled: true, |
| 64 | }, |
| 65 | }, |
Bill Peckham | 2a13eb6 | 2019-10-17 18:07:39 -0700 | [diff] [blame] | 66 | static_libs: ["libbrotli"], |
Elliott Hughes | 7e4c269 | 2017-05-23 13:40:14 -0700 | [diff] [blame] | 67 | } |
Colin Cross | f55cbaf | 2018-09-11 15:45:18 -0700 | [diff] [blame] | 68 | |
| 69 | // |
| 70 | // Support for brotli in java code. |
| 71 | // |
| 72 | |
| 73 | java_library { |
| 74 | name: "brotli-java", |
| 75 | host_supported: true, |
| 76 | hostdex: true, |
| 77 | srcs: ["java/**/*.java"], |
| 78 | exclude_srcs: ["java/**/*Test.java"], |
Jeff Sharkey | 1ac7fc6 | 2018-10-02 10:57:12 -0600 | [diff] [blame] | 79 | sdk_version: "current", |
Colin Cross | f55cbaf | 2018-09-11 15:45:18 -0700 | [diff] [blame] | 80 | } |