blob: a0c5c1bf47dfa4e6538f7af6ac4e6ebe6f708704 [file] [log] [blame]
Dan Willemsen710b7222016-07-13 23:33:44 -07001// 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 Badour9f370cf2021-02-12 21:33:37 -080015package {
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
33license {
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 Cui848a1b62016-07-26 15:01:09 -070049cc_library {
Dan Willemsen710b7222016-07-13 23:33:44 -070050 name: "libevent",
51 host_supported: true,
Inseob Kim03001bd2021-06-14 11:55:26 +090052 ramdisk_available: true,
Dan Willemsen509ebc12018-10-23 13:46:34 -070053 recovery_available: true,
Dan Willemsen596447c2017-04-07 14:12:51 -070054 vendor_available: true,
Justin Yunfc8d4322020-11-11 16:27:20 +090055 product_available: true,
Justin Yunf109eb42017-07-24 15:19:44 +090056 vndk: {
57 enabled: true,
58 },
Dan Willemsen0a4fdc92016-07-22 13:43:21 -070059 unique_host_soname: true,
Dan Willemsen710b7222016-07-13 23:33:44 -070060
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 Willemsen710b7222016-07-13 23:33:44 -070074 export_include_dirs: ["include"],
75
Narayan Kamathfc74cb42017-09-13 12:53:52 +010076 local_include_dirs: ["compat"],
77
Dan Willemsen710b7222016-07-13 23:33:44 -070078 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 Lehmer82374222021-01-15 17:04:56 -080089 "evthread_pthread.c",
Dan Willemsen710b7222016-07-13 23:33:44 -070090 "evutil.c",
91 "evutil_rand.c",
Narayan Kamathfc74cb42017-09-13 12:53:52 +010092 "evutil_time.c",
Dan Willemsen710b7222016-07-13 23:33:44 -070093 "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 Willemsen98a4ebe2017-10-03 14:16:05 -0700109 linux: {
Dan Willemsen710b7222016-07-13 23:33:44 -0700110 srcs: ["epoll.c"],
Dan Willemsen710b7222016-07-13 23:33:44 -0700111 },
Dan Willemsen520e0222017-03-15 14:37:17 -0700112 linux_bionic: {
113 enabled: true,
Dan Willemsen520e0222017-03-15 14:37:17 -0700114 },
Dan Willemsen710b7222016-07-13 23:33:44 -0700115 darwin: {
116 srcs: ["kqueue.c"],
117 },
118 },
Roopa Sattiraju8dd4c4c2021-12-22 14:39:06 -0800119 min_sdk_version: "30",
William Escanded2693d52022-03-02 20:24:41 +0100120 apex_available: [
121 "//apex_available:platform",
122 "com.android.bluetooth",
123 ],
Dan Willemsen710b7222016-07-13 23:33:44 -0700124}