зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1206558 (part 5) - Give libevent its own moz.build file. r=mshal.
I originally tried putting it in ipc/chromium/src/third_party/libevent/, but that directory already has a Makefile.in file, which caused problems, so I moved it down one directory. --HG-- extra : rebase_source : 63024d67c7b0f9215474cc85b475a4740ce51dc0
This commit is contained in:
Родитель
555a6bb686
Коммит
89cb2574cf
|
@ -95,32 +95,7 @@ if os_win:
|
||||||
'src/chrome/common/transport_dib_win.cc',
|
'src/chrome/common/transport_dib_win.cc',
|
||||||
]
|
]
|
||||||
elif not CONFIG['MOZ_NATIVE_LIBEVENT']:
|
elif not CONFIG['MOZ_NATIVE_LIBEVENT']:
|
||||||
UNIFIED_SOURCES += [
|
DIRS += ['src/third_party']
|
||||||
'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',
|
|
||||||
]
|
|
||||||
DEFINES['HAVE_CONFIG_H'] = True
|
DEFINES['HAVE_CONFIG_H'] = True
|
||||||
LOCAL_INCLUDES += sorted([
|
LOCAL_INCLUDES += sorted([
|
||||||
'src/third_party/libevent',
|
'src/third_party/libevent',
|
||||||
|
@ -173,10 +148,6 @@ if os_macosx:
|
||||||
# of NoOp.
|
# of NoOp.
|
||||||
'src/base/platform_thread_mac.mm',
|
'src/base/platform_thread_mac.mm',
|
||||||
]
|
]
|
||||||
if not CONFIG['MOZ_NATIVE_LIBEVENT']:
|
|
||||||
UNIFIED_SOURCES += [
|
|
||||||
'src/third_party/libevent/kqueue.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
if os_bsd:
|
if os_bsd:
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
|
@ -200,10 +171,6 @@ if os_bsd:
|
||||||
'!moc_message_pump_qt.cc',
|
'!moc_message_pump_qt.cc',
|
||||||
'src/base/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:
|
if os_linux:
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
|
@ -227,14 +194,6 @@ if os_linux:
|
||||||
'!moc_message_pump_qt.cc',
|
'!moc_message_pump_qt.cc',
|
||||||
'src/base/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']
|
ost = CONFIG['OS_TEST']
|
||||||
if '86' not in ost and 'arm' not in ost and 'mips' not in ost:
|
if '86' not in ost and 'arm' not in ost and 'mips' not in ost:
|
||||||
|
|
|
@ -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'
|
Загрузка…
Ссылка в новой задаче