diff --git a/ipc/chromium/moz.build b/ipc/chromium/moz.build index f466809f18ca..87f48d474b71 100644 --- a/ipc/chromium/moz.build +++ b/ipc/chromium/moz.build @@ -95,32 +95,7 @@ if os_win: 'src/chrome/common/transport_dib_win.cc', ] elif not CONFIG['MOZ_NATIVE_LIBEVENT']: - UNIFIED_SOURCES += [ - 'src/third_party/libevent/buffer.c', - 'src/third_party/libevent/bufferevent.c', - 'src/third_party/libevent/bufferevent_ratelim.c', - 'src/third_party/libevent/bufferevent_sock.c', - 'src/third_party/libevent/event.c', - 'src/third_party/libevent/event_tagging.c', - 'src/third_party/libevent/evmap.c', - 'src/third_party/libevent/evrpc.c', - 'src/third_party/libevent/evthread.c', - 'src/third_party/libevent/evthread_pthread.c', - 'src/third_party/libevent/evutil.c', - 'src/third_party/libevent/evutil_rand.c', - 'src/third_party/libevent/http.c', - 'src/third_party/libevent/listener.c', - 'src/third_party/libevent/log.c', - 'src/third_party/libevent/poll.c', - 'src/third_party/libevent/select.c', - 'src/third_party/libevent/signal.c', - 'src/third_party/libevent/strlcpy.c', - ] - SOURCES += [ - # This file cannot be built in unified mode because of strtotimeval - # symbol clash. - 'src/third_party/libevent/evdns.c', - ] + DIRS += ['src/third_party'] DEFINES['HAVE_CONFIG_H'] = True LOCAL_INCLUDES += sorted([ 'src/third_party/libevent', @@ -173,10 +148,6 @@ if os_macosx: # of NoOp. 'src/base/platform_thread_mac.mm', ] - if not CONFIG['MOZ_NATIVE_LIBEVENT']: - UNIFIED_SOURCES += [ - 'src/third_party/libevent/kqueue.c', - ] if os_bsd: SOURCES += [ @@ -200,10 +171,6 @@ if os_bsd: '!moc_message_pump_qt.cc', 'src/base/message_pump_qt.cc', ] - if not CONFIG['MOZ_NATIVE_LIBEVENT']: - SOURCES += [ - 'src/third_party/libevent/kqueue.c', - ] if os_linux: SOURCES += [ @@ -227,14 +194,6 @@ if os_linux: '!moc_message_pump_qt.cc', 'src/base/message_pump_qt.cc', ] - if not CONFIG['MOZ_NATIVE_LIBEVENT']: - SOURCES += [ - 'src/third_party/libevent/epoll.c', - ] - if CONFIG['OS_TARGET'] != 'Android': - SOURCES += [ - 'src/third_party/libevent/epoll_sub.c', - ] ost = CONFIG['OS_TEST'] if '86' not in ost and 'arm' not in ost and 'mips' not in ost: diff --git a/ipc/chromium/src/third_party/moz.build b/ipc/chromium/src/third_party/moz.build new file mode 100644 index 000000000000..f5e1ee75b881 --- /dev/null +++ b/ipc/chromium/src/third_party/moz.build @@ -0,0 +1,80 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +if CONFIG['OS_ARCH'] == 'WINNT': + error('should not reach here on Windows') + +if CONFIG['MOZ_NATIVE_LIBEVENT']: + error('should not reach here if we are using a native libevent') + +os_macosx = 0 +os_bsd = 0 +os_linux = 0 + +if CONFIG['OS_ARCH'] == 'Darwin': + os_macosx = 1 + libevent_include_suffix = 'mac' +elif CONFIG['OS_ARCH'] in ['DragonFly', 'FreeBSD', 'GNU_kFreeBSD', + 'NetBSD', 'OpenBSD']: + os_bsd = 1 + libevent_include_suffix = 'bsd' +else: + os_linux = 1 + if CONFIG['OS_TARGET'] == 'Android': + libevent_include_suffix = 'android' + else: + libevent_include_suffix = 'linux' + +UNIFIED_SOURCES += [ + 'libevent/buffer.c', + 'libevent/bufferevent.c', + 'libevent/bufferevent_ratelim.c', + 'libevent/bufferevent_sock.c', + 'libevent/event.c', + 'libevent/event_tagging.c', + 'libevent/evmap.c', + 'libevent/evrpc.c', + 'libevent/evthread.c', + 'libevent/evthread_pthread.c', + 'libevent/evutil.c', + 'libevent/evutil_rand.c', + 'libevent/http.c', + 'libevent/listener.c', + 'libevent/log.c', + 'libevent/poll.c', + 'libevent/select.c', + 'libevent/signal.c', + 'libevent/strlcpy.c', +] +SOURCES += [ + # This file cannot be built in unified mode because of strtotimeval + # symbol clash. + 'libevent/evdns.c', +] +DEFINES['HAVE_CONFIG_H'] = True +LOCAL_INCLUDES += sorted([ + 'libevent', + 'libevent/include', + 'libevent/' + libevent_include_suffix, +]) + +if os_macosx or os_bsd: + UNIFIED_SOURCES += [ + 'libevent/kqueue.c', + ] + +if os_linux: + SOURCES += [ + 'libevent/epoll.c', + ] + if CONFIG['OS_TARGET'] != 'Android': + SOURCES += [ + 'libevent/epoll_sub.c', + ] + +ALLOW_COMPILER_WARNINGS = True + +FINAL_LIBRARY = 'xul'