forked from mirrors/gecko-dev
Bug 1883548 - Remove os_* variables in libeventcommon.mozbuild. r=firefox-build-system-reviewers,ahochheiden
To replace them, we now expose configure's target.kernel to moz.build. Differential Revision: https://phabricator.services.mozilla.com/D203546
This commit is contained in:
parent
650b7c6dbb
commit
33df62fd34
4 changed files with 25 additions and 43 deletions
|
|
@ -847,6 +847,7 @@ add_old_configure_assignment("TARGET_CPU", target.cpu)
|
|||
set_config("TARGET_RAW_CPU", target.raw_cpu)
|
||||
set_config("TARGET_OS", target.os)
|
||||
set_config("TARGET_RAW_OS", target.raw_os)
|
||||
set_config("TARGET_KERNEL", target.kernel)
|
||||
set_config("TARGET_ENDIANNESS", target.endianness)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ UNIFIED_SOURCES += [
|
|||
"src/mojo/core/ports/user_message.cc",
|
||||
]
|
||||
|
||||
if os_win:
|
||||
if CONFIG["TARGET_KERNEL"] == "WINNT":
|
||||
SOURCES += [
|
||||
"src/base/condition_variable_win.cc",
|
||||
"src/base/lock_impl_win.cc",
|
||||
|
|
@ -60,7 +60,7 @@ if os_win:
|
|||
elif not CONFIG["MOZ_SYSTEM_LIBEVENT"]:
|
||||
DIRS += ["src/third_party"]
|
||||
|
||||
if os_posix:
|
||||
if CONFIG["TARGET_KERNEL"] != "WINNT":
|
||||
UNIFIED_SOURCES += [
|
||||
"src/base/condition_variable_posix.cc",
|
||||
"src/base/lock_impl_posix.cc",
|
||||
|
|
@ -75,7 +75,7 @@ if os_posix:
|
|||
"src/chrome/common/process_watcher_posix_sigchld.cc",
|
||||
]
|
||||
|
||||
if os_macosx:
|
||||
if CONFIG["TARGET_KERNEL"] == "Darwin":
|
||||
UNIFIED_SOURCES += [
|
||||
"src/base/chrome_application_mac.mm",
|
||||
"src/base/mac_util.mm",
|
||||
|
|
@ -93,13 +93,13 @@ if os_macosx:
|
|||
"src/base/platform_thread_mac.mm",
|
||||
]
|
||||
|
||||
if os_bsd:
|
||||
if CONFIG["TARGET_KERNEL"] in ("DragonFly", "FreeBSD", "NetBSD", "OpenBSD"):
|
||||
SOURCES += [
|
||||
"src/base/process_util_linux.cc",
|
||||
"src/base/time_posix.cc",
|
||||
]
|
||||
|
||||
if os_linux:
|
||||
if CONFIG["TARGET_KERNEL"] == "Linux":
|
||||
SOURCES += [
|
||||
"src/base/process_util_linux.cc",
|
||||
"src/base/set_process_title_linux.cc",
|
||||
|
|
@ -112,17 +112,15 @@ if os_linux:
|
|||
DEFINES["ANDROID"] = True
|
||||
DEFINES["_POSIX_MONOTONIC_CLOCK"] = 0
|
||||
|
||||
if os_bsd or os_linux:
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
SOURCES += [
|
||||
"src/base/message_pump_glib.cc",
|
||||
]
|
||||
|
||||
if os_solaris:
|
||||
if CONFIG["TARGET_KERNEL"] == "SunOS":
|
||||
SOURCES += [
|
||||
"src/base/process_util_linux.cc",
|
||||
"src/base/time_posix.cc",
|
||||
]
|
||||
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
SOURCES += [
|
||||
"src/base/message_pump_glib.cc",
|
||||
]
|
||||
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
|
||||
|
|
|
|||
|
|
@ -4,35 +4,18 @@
|
|||
# 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/.
|
||||
|
||||
os_win = 0
|
||||
os_posix = 0
|
||||
os_macosx = 0
|
||||
os_bsd = 0
|
||||
os_linux = 0
|
||||
os_solaris = 0
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
os_win = 1
|
||||
if CONFIG['TARGET_KERNEL'] == 'Darwin':
|
||||
libevent_include_suffix = 'mac'
|
||||
elif CONFIG['TARGET_KERNEL'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'):
|
||||
libevent_include_suffix = 'bsd'
|
||||
elif CONFIG['TARGET_KERNEL'] == 'SunOS':
|
||||
libevent_include_suffix = 'solaris'
|
||||
elif CONFIG['TARGET_OS'] == 'Android':
|
||||
libevent_include_suffix = 'android'
|
||||
else:
|
||||
os_posix = 1
|
||||
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'
|
||||
elif CONFIG['OS_ARCH'] == 'SunOS':
|
||||
os_solaris = 1
|
||||
libevent_include_suffix = 'solaris'
|
||||
else:
|
||||
os_linux = 1
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
libevent_include_suffix = 'android'
|
||||
else:
|
||||
libevent_include_suffix = 'linux'
|
||||
libevent_include_suffix = 'linux'
|
||||
|
||||
if os_posix and not CONFIG['MOZ_SYSTEM_LIBEVENT']:
|
||||
if CONFIG["TARGET_KERNEL"] != "WINNT" and not CONFIG['MOZ_SYSTEM_LIBEVENT']:
|
||||
DEFINES['HAVE_CONFIG_H'] = True
|
||||
LOCAL_INCLUDES += sorted([
|
||||
'libevent',
|
||||
|
|
|
|||
8
ipc/chromium/src/third_party/moz.build
vendored
8
ipc/chromium/src/third_party/moz.build
vendored
|
|
@ -7,7 +7,7 @@
|
|||
libevent_path_prefix = '.'
|
||||
include(libevent_path_prefix + '/libeventcommon.mozbuild')
|
||||
|
||||
if os_win:
|
||||
if CONFIG["TARGET_KERNEL"] == "WINNT":
|
||||
error('should not reach here on Windows')
|
||||
|
||||
if CONFIG['MOZ_SYSTEM_LIBEVENT']:
|
||||
|
|
@ -42,12 +42,12 @@ SOURCES += [
|
|||
# 'libevent/evrpc.c', # Unused file. # conflicting TAILQ_ENTRY definition
|
||||
]
|
||||
|
||||
if os_macosx or os_bsd:
|
||||
if CONFIG["TARGET_KERNEL"] in ("Darwin", "DragonFly", "FreeBSD", "NetBSD", "OpenBSD"):
|
||||
UNIFIED_SOURCES += [
|
||||
'libevent/kqueue.c',
|
||||
]
|
||||
|
||||
if os_linux:
|
||||
if CONFIG["TARGET_KERNEL"] == "Linux":
|
||||
UNIFIED_SOURCES += [
|
||||
'libevent/epoll.c',
|
||||
]
|
||||
|
|
@ -56,7 +56,7 @@ if os_linux:
|
|||
'libevent/epoll_sub.c',
|
||||
]
|
||||
|
||||
if os_solaris:
|
||||
if CONFIG["TARGET_KERNEL"] == "SunOS":
|
||||
SOURCES += [
|
||||
'libevent/devpoll.c',
|
||||
'libevent/evport.c',
|
||||
|
|
|
|||
Loading…
Reference in a new issue