Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 1 | // Copyright (C) 2015 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 | |
Bob Badour | 9f370cf | 2021-02-12 21:33:37 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["external_libevent_license"], |
| 17 | } |
| 18 | |
| 19 | // Added automatically by a large-scale-change that took the approach of |
| 20 | // 'apply every license found to every target'. While this makes sure we respect |
| 21 | // every license restriction, it may not be entirely correct. |
| 22 | // |
| 23 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 24 | // |
| 25 | // Please consider splitting the single license below into multiple licenses, |
| 26 | // taking care not to lose any license_kind information, and overriding the |
| 27 | // default license using the 'licenses: [...]' property on targets as needed. |
| 28 | // |
| 29 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 30 | // to attach the license to, and including a comment whether the files may be |
| 31 | // used in the current project. |
| 32 | // See: http://go/android-license-faq |
| 33 | license { |
| 34 | name: "external_libevent_license", |
| 35 | visibility: [":__subpackages__"], |
| 36 | license_kinds: [ |
| 37 | "SPDX-license-identifier-BSD", |
| 38 | "SPDX-license-identifier-BSL-1.0", |
| 39 | "SPDX-license-identifier-ISC", |
| 40 | "SPDX-license-identifier-MIT", |
| 41 | "legacy_notice", |
| 42 | "legacy_unencumbered", |
| 43 | ], |
| 44 | license_text: [ |
| 45 | "LICENSE", |
| 46 | ], |
| 47 | } |
| 48 | |
Yabin Cui | 848a1b6 | 2016-07-26 15:01:09 -0700 | [diff] [blame] | 49 | cc_library { |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 50 | name: "libevent", |
| 51 | host_supported: true, |
Inseob Kim | 03001bd | 2021-06-14 11:55:26 +0900 | [diff] [blame] | 52 | ramdisk_available: true, |
Dan Willemsen | 509ebc1 | 2018-10-23 13:46:34 -0700 | [diff] [blame] | 53 | recovery_available: true, |
Dan Willemsen | 596447c | 2017-04-07 14:12:51 -0700 | [diff] [blame] | 54 | vendor_available: true, |
Justin Yun | fc8d432 | 2020-11-11 16:27:20 +0900 | [diff] [blame] | 55 | product_available: true, |
Justin Yun | f109eb4 | 2017-07-24 15:19:44 +0900 | [diff] [blame] | 56 | vndk: { |
| 57 | enabled: true, |
| 58 | }, |
Dan Willemsen | 0a4fdc9 | 2016-07-22 13:43:21 -0700 | [diff] [blame] | 59 | unique_host_soname: true, |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 60 | |
| 61 | arch: { |
| 62 | arm: { |
| 63 | instruction_set: "arm", |
| 64 | }, |
| 65 | }, |
| 66 | cflags: [ |
| 67 | "-D_BSD_SOURCE", |
| 68 | "-O3", |
| 69 | "-Wno-implicit-function-declaration", |
| 70 | "-Wno-strict-aliasing", |
| 71 | "-Wno-unused-parameter", |
| 72 | "-Werror", |
| 73 | ], |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 74 | export_include_dirs: ["include"], |
| 75 | |
Narayan Kamath | fc74cb4 | 2017-09-13 12:53:52 +0100 | [diff] [blame] | 76 | local_include_dirs: ["compat"], |
| 77 | |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 78 | srcs: [ |
| 79 | // core |
| 80 | "buffer.c", |
| 81 | "bufferevent.c", |
| 82 | "bufferevent_filter.c", |
| 83 | "bufferevent_pair.c", |
| 84 | "bufferevent_ratelim.c", |
| 85 | "bufferevent_sock.c", |
| 86 | "event.c", |
| 87 | "evmap.c", |
| 88 | "evthread.c", |
Andrew Lehmer | 8237422 | 2021-01-15 17:04:56 -0800 | [diff] [blame] | 89 | "evthread_pthread.c", |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 90 | "evutil.c", |
| 91 | "evutil_rand.c", |
Narayan Kamath | fc74cb4 | 2017-09-13 12:53:52 +0100 | [diff] [blame] | 92 | "evutil_time.c", |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 93 | "listener.c", |
| 94 | "log.c", |
| 95 | "signal.c", |
| 96 | "strlcpy.c", |
| 97 | |
| 98 | // extra |
| 99 | "evdns.c", |
| 100 | "event_tagging.c", |
| 101 | "evrpc.c", |
| 102 | "http.c", |
| 103 | |
| 104 | "poll.c", |
| 105 | "select.c", |
| 106 | ], |
| 107 | |
| 108 | target: { |
Dan Willemsen | 98a4ebe | 2017-10-03 14:16:05 -0700 | [diff] [blame] | 109 | linux: { |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 110 | srcs: ["epoll.c"], |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 111 | }, |
Dan Willemsen | 520e022 | 2017-03-15 14:37:17 -0700 | [diff] [blame] | 112 | linux_bionic: { |
| 113 | enabled: true, |
Dan Willemsen | 520e022 | 2017-03-15 14:37:17 -0700 | [diff] [blame] | 114 | }, |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 115 | darwin: { |
| 116 | srcs: ["kqueue.c"], |
| 117 | }, |
| 118 | }, |
Roopa Sattiraju | 8dd4c4c | 2021-12-22 14:39:06 -0800 | [diff] [blame] | 119 | min_sdk_version: "30", |
William Escande | d2693d5 | 2022-03-02 20:24:41 +0100 | [diff] [blame] | 120 | apex_available: [ |
| 121 | "//apex_available:platform", |
| 122 | "com.android.bluetooth", |
| 123 | ], |
Dan Willemsen | 710b722 | 2016-07-13 23:33:44 -0700 | [diff] [blame] | 124 | } |