blob: b576f5296d07a68d5821a37853ad16abddf9885b [file] [log] [blame]
Brian Silvermanaa651172015-09-26 17:39:06 -04001licenses(['notice'])
2
Austin Schuh23da18b2015-10-11 20:52:49 -07003load('/tools/build_rules/select', 'compiler_select')
4
Brian Silvermanaa651172015-09-26 17:39:06 -04005cc_library(
6 name = 'libevent',
7 visibility = ['//visibility:public'],
8 srcs = [
9 'select.c',
10 'poll.c',
11 'epoll.c',
12 'signal.c',
13
14 'event.c',
15 'evthread.c',
16 'buffer.c',
17 'bufferevent.c',
18 'bufferevent_sock.c',
19 'bufferevent_filter.c',
20 'bufferevent_pair.c',
21 'listener.c',
22 'bufferevent_ratelim.c',
23 'evmap.c',
24 'log.c',
25 'evutil.c',
26 'evutil_rand.c',
27 'strlcpy.c',
28
29 'event_tagging.c',
30 'http.c',
31 'evdns.c',
32 'evrpc.c',
33
34 'evthread_pthread.c',
35
36 'include/event2/event-config.h',
37
38 #'compat/sys/queue.h',
39 ] + glob([
40 '*-internal.h',
41 ]),
42 hdrs = [
43 'event.h',
44 'evhttp.h',
45 'evdns.h',
46 'evrpc.h',
47 'evutil.h',
48 ],
49 includes = ['.', 'include'],
50 copts = [
51 '-Ithird_party/libevent/compat',
52 '-Ithird_party/libevent/include',
Brian Silvermanf1cff392015-10-11 19:36:18 -040053
54 # TODO(Brian): Fix the places in the code it uses char* as an intermediate
55 # type while doing offsetof stuff.
56 '-Wno-cast-align',
57
58 '-Wno-unused-parameter',
59 '-Wno-format-nonliteral',
60 '-Wno-cast-qual',
Brian Silvermanf1cff392015-10-11 19:36:18 -040061 '-Wno-unused-function',
Austin Schuh23da18b2015-10-11 20:52:49 -070062 ] + compiler_select({
63 'gcc': [],
64 'clang': ['-Wno-incompatible-pointer-types-discards-qualifiers']
65 }),
Brian Silvermanaa651172015-09-26 17:39:06 -040066)