2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:22 +04:00
|
|
|
# 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/.
|
2017-07-20 18:24:08 +03:00
|
|
|
include('/media/webrtc/webrtc.mozbuild')
|
2013-02-26 00:47:22 +04:00
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
|
|
|
'nsIIPCSerializableInputStream.h',
|
|
|
|
'nsIIPCSerializableURI.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
EXPORTS.mozilla.ipc += [
|
2013-11-27 11:59:41 +04:00
|
|
|
'BackgroundChild.h',
|
|
|
|
'BackgroundParent.h',
|
2014-07-07 22:13:04 +04:00
|
|
|
'BackgroundUtils.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'BrowserProcessSubThread.h',
|
2017-11-29 18:11:15 +03:00
|
|
|
'ByteBuf.h',
|
2016-10-12 00:25:17 +03:00
|
|
|
'CrashReporterClient.h',
|
|
|
|
'CrashReporterHost.h',
|
|
|
|
'CrashReporterMetadataShmem.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'CrossProcessMutex.h',
|
2017-02-14 11:10:35 +03:00
|
|
|
'CrossProcessSemaphore.h',
|
2018-01-08 12:07:16 +03:00
|
|
|
'EnvironmentMap.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'FileDescriptor.h',
|
2014-09-27 03:21:57 +04:00
|
|
|
'FileDescriptorSetChild.h',
|
|
|
|
'FileDescriptorSetParent.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'FileDescriptorUtils.h',
|
|
|
|
'GeckoChildProcessHost.h',
|
|
|
|
'InputStreamUtils.h',
|
2013-10-24 03:05:43 +04:00
|
|
|
'IOThreadChild.h',
|
2017-03-14 14:29:43 +03:00
|
|
|
'IPCStreamAlloc.h',
|
|
|
|
'IPCStreamDestination.h',
|
|
|
|
'IPCStreamSource.h',
|
2016-05-15 20:32:09 +03:00
|
|
|
'IPCStreamUtils.h',
|
2018-02-28 00:37:53 +03:00
|
|
|
'IPDLParamTraits.h',
|
2013-09-28 05:42:08 +04:00
|
|
|
'MessageChannel.h',
|
|
|
|
'MessageLink.h',
|
2015-07-21 10:21:51 +03:00
|
|
|
'Neutering.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'ProcessChild.h',
|
|
|
|
'ProtocolUtils.h',
|
|
|
|
'ScopedXREEmbed.h',
|
|
|
|
'SharedMemory.h',
|
|
|
|
'SharedMemoryBasic.h',
|
|
|
|
'Shmem.h',
|
2016-06-10 22:43:35 +03:00
|
|
|
'TaskFactory.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Transport.h',
|
|
|
|
'URIUtils.h',
|
2014-05-18 07:16:51 +04:00
|
|
|
'WindowsMessageLoop.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
EXPORTS.mozilla.ipc += [
|
|
|
|
'Transport_win.h',
|
|
|
|
]
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'SharedMemory_windows.cpp',
|
|
|
|
'Transport_win.cpp',
|
|
|
|
'WindowsMessageLoop.cpp',
|
|
|
|
]
|
2013-04-16 23:24:43 +04:00
|
|
|
else:
|
|
|
|
EXPORTS.mozilla.ipc += [
|
|
|
|
'Transport_posix.h',
|
|
|
|
]
|
2013-11-22 22:53:02 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'SharedMemory_posix.cpp',
|
|
|
|
'Transport_posix.cpp',
|
|
|
|
]
|
2013-04-16 23:24:43 +04:00
|
|
|
|
2013-12-20 00:19:25 +04:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
SOURCES += [
|
|
|
|
'CrossProcessMutex_windows.cpp',
|
|
|
|
]
|
2016-03-01 00:34:46 +03:00
|
|
|
elif not CONFIG['OS_ARCH'] in ('NetBSD', 'OpenBSD'):
|
2013-12-20 00:19:25 +04:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'CrossProcessMutex_posix.cpp',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'CrossProcessMutex_unimplemented.cpp',
|
|
|
|
]
|
|
|
|
|
2017-02-14 11:10:35 +03:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
SOURCES += [
|
|
|
|
'CrossProcessSemaphore_windows.cpp',
|
|
|
|
]
|
2017-02-27 08:23:52 +03:00
|
|
|
elif CONFIG['OS_ARCH'] != 'Darwin':
|
2017-02-14 11:10:35 +03:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'CrossProcessSemaphore_posix.cpp',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'CrossProcessSemaphore_unimplemented.cpp',
|
|
|
|
]
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
# Android has its own,
|
|
|
|
# almost-but-not-quite-compatible-with-POSIX-or-/dev/shm shared memory
|
|
|
|
# impl.
|
|
|
|
if CONFIG['OS_TARGET'] == 'Android':
|
|
|
|
EXPORTS.mozilla.ipc += ['SharedMemoryBasic_android.h']
|
2013-11-22 22:53:02 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'SharedMemoryBasic_android.cpp',
|
|
|
|
]
|
2015-06-17 07:38:38 +03:00
|
|
|
elif CONFIG['OS_ARCH'] == 'Darwin':
|
|
|
|
EXPORTS.mozilla.ipc += ['SharedMemoryBasic_mach.h']
|
|
|
|
SOURCES += [
|
2015-09-22 20:59:00 +03:00
|
|
|
'SharedMemoryBasic_mach.mm',
|
2015-06-17 07:38:38 +03:00
|
|
|
]
|
2013-04-16 23:24:43 +04:00
|
|
|
else:
|
|
|
|
EXPORTS.mozilla.ipc += ['SharedMemoryBasic_chromium.h']
|
|
|
|
|
2013-04-24 01:54:15 +04:00
|
|
|
if CONFIG['OS_ARCH'] == 'Linux':
|
2013-11-22 22:53:02 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'ProcessUtils_linux.cpp',
|
|
|
|
]
|
2014-02-19 00:41:23 +04:00
|
|
|
elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'):
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'ProcessUtils_bsd.cpp'
|
|
|
|
]
|
2015-02-26 21:21:52 +03:00
|
|
|
elif CONFIG['OS_ARCH'] == 'Darwin':
|
2014-08-26 21:03:09 +04:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'ProcessUtils_mac.mm'
|
|
|
|
]
|
2013-04-24 01:54:15 +04:00
|
|
|
else:
|
2013-11-22 22:53:02 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'ProcessUtils_none.cpp',
|
|
|
|
]
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS.ipc += [
|
|
|
|
'IPCMessageUtils.h',
|
|
|
|
]
|
|
|
|
|
2013-11-22 22:53:02 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-11-27 11:59:41 +04:00
|
|
|
'BackgroundImpl.cpp',
|
2014-07-07 22:13:04 +04:00
|
|
|
'BackgroundUtils.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'BrowserProcessSubThread.cpp',
|
2016-10-12 00:25:17 +03:00
|
|
|
'CrashReporterClient.cpp',
|
|
|
|
'CrashReporterHost.cpp',
|
|
|
|
'CrashReporterMetadataShmem.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'FileDescriptor.cpp',
|
|
|
|
'FileDescriptorUtils.cpp',
|
|
|
|
'InputStreamUtils.cpp',
|
2016-04-28 20:00:46 +03:00
|
|
|
'IPCMessageUtils.cpp',
|
2017-03-14 14:29:43 +03:00
|
|
|
'IPCStreamChild.cpp',
|
|
|
|
'IPCStreamDestination.cpp',
|
|
|
|
'IPCStreamParent.cpp',
|
|
|
|
'IPCStreamSource.cpp',
|
2016-05-15 20:32:09 +03:00
|
|
|
'IPCStreamUtils.cpp',
|
2013-09-28 05:42:08 +04:00
|
|
|
'MessageChannel.cpp',
|
|
|
|
'MessageLink.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'MessagePump.cpp',
|
|
|
|
'ProcessChild.cpp',
|
|
|
|
'ProtocolUtils.cpp',
|
|
|
|
'ScopedXREEmbed.cpp',
|
|
|
|
'SharedMemory.cpp',
|
|
|
|
'Shmem.cpp',
|
|
|
|
'StringUtil.cpp',
|
2017-04-11 00:50:00 +03:00
|
|
|
'URIUtils.cpp',
|
2013-11-22 22:53:02 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
SOURCES += [
|
2013-11-27 11:59:41 +04:00
|
|
|
'BackgroundChildImpl.cpp',
|
|
|
|
'BackgroundParentImpl.cpp',
|
2014-09-27 03:21:57 +04:00
|
|
|
'FileDescriptorSetChild.cpp',
|
|
|
|
'FileDescriptorSetParent.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
2017-04-11 00:50:00 +03:00
|
|
|
if CONFIG['OS_ARCH'] == 'Darwin':
|
|
|
|
# GeckoChildProcessHost.cpp cannot be built unified due to OSX header
|
|
|
|
# clashes with TextRange.
|
|
|
|
SOURCES += [
|
|
|
|
'GeckoChildProcessHost.cpp',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'GeckoChildProcessHost.cpp',
|
|
|
|
]
|
|
|
|
|
2017-12-08 15:46:13 +03:00
|
|
|
if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
|
2016-03-24 03:19:20 +03:00
|
|
|
# This is intended as a temporary hack to support building with VS2015.
|
|
|
|
# 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
|
|
|
|
SOURCES['BackgroundChildImpl.cpp'].flags += ['-wd4312']
|
|
|
|
SOURCES['BackgroundParentImpl.cpp'].flags += ['-wd4312']
|
|
|
|
|
2013-11-27 11:59:41 +04:00
|
|
|
LOCAL_INCLUDES += [
|
2015-04-07 01:44:04 +03:00
|
|
|
'/caps',
|
2015-01-15 19:58:40 +03:00
|
|
|
'/dom/broadcastchannel',
|
2014-10-16 08:56:52 +04:00
|
|
|
'/dom/indexedDB',
|
2017-08-08 23:56:49 +03:00
|
|
|
'/dom/storage',
|
2015-08-31 15:51:29 +03:00
|
|
|
'/media/webrtc/trunk',
|
2013-11-27 11:59:41 +04:00
|
|
|
'/xpcom/build',
|
|
|
|
]
|
|
|
|
|
2013-07-01 17:56:28 +04:00
|
|
|
IPDL_SOURCES = [
|
|
|
|
'InputStreamParams.ipdlh',
|
2016-05-15 20:32:09 +03:00
|
|
|
'IPCStream.ipdlh',
|
2013-11-27 11:59:41 +04:00
|
|
|
'PBackground.ipdl',
|
2014-07-07 22:13:04 +04:00
|
|
|
'PBackgroundSharedTypes.ipdlh',
|
2013-11-27 11:59:41 +04:00
|
|
|
'PBackgroundTest.ipdl',
|
2017-03-14 14:28:58 +03:00
|
|
|
'PChildToParentStream.ipdl',
|
2014-09-27 03:21:57 +04:00
|
|
|
'PFileDescriptorSet.ipdl',
|
2017-03-14 14:29:43 +03:00
|
|
|
'PParentToChildStream.ipdl',
|
2013-05-31 17:16:57 +04:00
|
|
|
'ProtocolTypes.ipdlh',
|
2013-07-01 17:56:28 +04:00
|
|
|
'URIParams.ipdlh',
|
|
|
|
]
|
2013-08-22 10:56:00 +04:00
|
|
|
|
2013-12-09 23:57:29 +04:00
|
|
|
LOCAL_INCLUDES += [
|
2016-10-12 00:25:17 +03:00
|
|
|
'/dom/ipc',
|
|
|
|
'/toolkit/crashreporter',
|
2014-07-30 11:24:00 +04:00
|
|
|
'/toolkit/xre',
|
2013-12-09 23:57:29 +04:00
|
|
|
'/xpcom/threads',
|
|
|
|
]
|
|
|
|
|
2013-10-02 21:17:55 +04:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2013-11-19 06:47:14 +04:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 17:55:07 +04:00
|
|
|
|
2018-01-11 04:42:15 +03:00
|
|
|
for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_BUNDLE',
|
|
|
|
'DLL_PREFIX', 'DLL_SUFFIX'):
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES[var] = '"%s"' % CONFIG[var]
|
2013-12-31 13:06:11 +04:00
|
|
|
|
2015-04-01 11:40:35 +03:00
|
|
|
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
|
2013-12-31 13:06:11 +04:00
|
|
|
LOCAL_INCLUDES += [
|
2015-04-01 11:40:35 +03:00
|
|
|
'/security/sandbox/chromium',
|
|
|
|
'/security/sandbox/chromium-shim',
|
2013-12-31 13:06:11 +04:00
|
|
|
'/security/sandbox/win/src/sandboxbroker',
|
|
|
|
]
|
2016-05-11 10:00:01 +03:00
|
|
|
|
2017-12-08 00:09:15 +03:00
|
|
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
2016-05-11 10:00:01 +03:00
|
|
|
CXXFLAGS += ['-Wno-shadow']
|
2018-05-21 20:53:34 +03:00
|
|
|
|
|
|
|
if CONFIG['NIGHTLY_BUILD']:
|
|
|
|
DEFINES['ASYNC_CONTENTPROC_LAUNCH'] = True
|
2018-04-05 22:48:11 +03:00
|
|
|
|
|
|
|
# Add libFuzzer configuration directives
|
|
|
|
include('/tools/fuzzing/libfuzzer-config.mozbuild')
|