Bumping manifests a=b2g-bump
[gecko.git] / ipc / glue / moz.build
blobc5f465fd09c47ffce1be69a9d38d6080adebce5b
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 EXPORTS += [
8     'nsIIPCBackgroundChildCreateCallback.h',
9     'nsIIPCSerializableInputStream.h',
10     'nsIIPCSerializableURI.h',
13 EXPORTS.mozilla.ipc += [
14     'BackgroundChild.h',
15     'BackgroundParent.h',
16     'BackgroundUtils.h',
17     'BrowserProcessSubThread.h',
18     'CrossProcessMutex.h',
19     'FileDescriptor.h',
20     'FileDescriptorUtils.h',
21     'GeckoChildProcessHost.h',
22     'InputStreamUtils.h',
23     'IOThreadChild.h',
24     'MessageChannel.h',
25     'MessageLink.h',
26     'ProcessChild.h',
27     'ProtocolUtils.h',
28     'ScopedXREEmbed.h',
29     'SharedMemory.h',
30     'SharedMemoryBasic.h',
31     'SharedMemorySysV.h',
32     'Shmem.h',
33     'Transport.h',
34     'URIUtils.h',
35     'WindowsMessageLoop.h',
38 if CONFIG['OS_ARCH'] == 'WINNT':
39     EXPORTS.mozilla.ipc += [
40         'Transport_win.h',
41     ]
42     SOURCES += [
43         'SharedMemory_windows.cpp',
44         'Transport_win.cpp',
45         'WindowsMessageLoop.cpp',
46     ]
47 else:
48     EXPORTS.mozilla.ipc += [
49         'Transport_posix.h',
50     ]
51     UNIFIED_SOURCES += [
52         'SharedMemory_posix.cpp',
53         'Transport_posix.cpp',
54     ]
56 if CONFIG['OS_ARCH'] == 'WINNT':
57     SOURCES += [
58         'CrossProcessMutex_windows.cpp',
59     ]
60 elif CONFIG['OS_ARCH'] == 'Linux':
61     UNIFIED_SOURCES += [
62         'CrossProcessMutex_posix.cpp',
63     ]
64 else:
65     UNIFIED_SOURCES += [
66         'CrossProcessMutex_unimplemented.cpp',
67     ]
69 # Android has its own,
70 # almost-but-not-quite-compatible-with-POSIX-or-/dev/shm shared memory
71 # impl.
72 if CONFIG['OS_TARGET'] == 'Android':
73     EXPORTS.mozilla.ipc += ['SharedMemoryBasic_android.h']
74     UNIFIED_SOURCES += [
75         'SharedMemoryBasic_android.cpp',
76     ]
77 else:
78     EXPORTS.mozilla.ipc += ['SharedMemoryBasic_chromium.h']
80 if CONFIG['OS_ARCH'] == 'Linux':
81     UNIFIED_SOURCES += [
82         'ProcessUtils_linux.cpp',
83     ]
84 elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'):
85     UNIFIED_SOURCES += [
86         'ProcessUtils_bsd.cpp'
87     ]
88 elif CONFIG['OS_ARCH'] in ('Darwin'):
89     UNIFIED_SOURCES += [
90         'ProcessUtils_mac.mm'
91     ]
92 else:
93     UNIFIED_SOURCES += [
94         'ProcessUtils_none.cpp',
95     ]
97 EXPORTS.ipc += [
98     'IPCMessageUtils.h',
101 UNIFIED_SOURCES += [
102     'BackgroundImpl.cpp',
103     'BackgroundUtils.cpp',
104     'BrowserProcessSubThread.cpp',
105     'FileDescriptor.cpp',
106     'FileDescriptorUtils.cpp',
107     'InputStreamUtils.cpp',
108     'MessageChannel.cpp',
109     'MessageLink.cpp',
110     'MessagePump.cpp',
111     'ProcessChild.cpp',
112     'ProtocolUtils.cpp',
113     'ScopedXREEmbed.cpp',
114     'SharedMemory.cpp',
115     'Shmem.cpp',
116     'StringUtil.cpp',
119 # GeckoChildProcessHost.cpp cannot be built in unified mode because it uses plarena.h.
120 # URIUtils.cpp cannot be built in unified mode because of name clashes on strdup.
121 SOURCES += [
122     'BackgroundChildImpl.cpp',
123     'BackgroundParentImpl.cpp',
124     'GeckoChildProcessHost.cpp',
125     'URIUtils.cpp',
128 LOCAL_INCLUDES += [
129     '/xpcom/build',
132 IPDL_SOURCES = [
133     'InputStreamParams.ipdlh',
134     'PBackground.ipdl',
135     'PBackgroundSharedTypes.ipdlh',
136     'PBackgroundTest.ipdl',
137     'PProcLoader.ipdl',
138     'ProtocolTypes.ipdlh',
139     'URIParams.ipdlh',
143 LOCAL_INCLUDES += [
144     '/toolkit/xre',
145     '/xpcom/threads',
148 include('/ipc/chromium/chromium-config.mozbuild')
150 FINAL_LIBRARY = 'xul'
152 for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_BUNDLE',
153             'DLL_PREFIX', 'DLL_SUFFIX'):
154     DEFINES[var] = '"%s"' % CONFIG[var]
156 LOCAL_INCLUDES += [
157     '/toolkit/crashreporter',
160 if CONFIG['OS_ARCH'] == 'WINNT':
161     LOCAL_INCLUDES += [
162         '/security/sandbox/win/src/sandboxbroker',
163     ]
165 FAIL_ON_WARNINGS = True