Bug 1655413 [wpt PR 24763] - Make CSP default-src without 'unsafe-eval' block eval...
[gecko.git] / dom / ipc / moz.build
blobbe1867d916b7eba774053026902411414c277589
1 # -*- Mode: python; 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 with Files("**"):
8     BUG_COMPONENT = ("Core", "DOM: Content Processes")
10 DIRS += ['jsactor']
12 XPIDL_SOURCES += [
13     'nsIDOMProcessChild.idl',
14     'nsIDOMProcessParent.idl',
15     'nsIHangReport.idl',
18 XPIDL_MODULE = 'dom'
20 EXTRA_JS_MODULES += [
21     'ManifestMessagesChild.jsm',
24 EXPORTS.mozilla.dom.ipc += [
25     'IdType.h',
26     'MemMapSnapshot.h',
27     'SharedMap.h',
28     'SharedMapChangeEvent.h',
29     'SharedStringMap.h',
30     'StringTable.h',
31     'StructuredCloneData.h',
34 EXPORTS.mozilla.dom += [
35     'BrowserBridgeChild.h',
36     'BrowserBridgeHost.h',
37     'BrowserBridgeParent.h',
38     'BrowserChild.h',
39     'BrowserHost.h',
40     'BrowserParent.h',
41     'ClonedErrorHolder.h',
42     'CoalescedInputData.h',
43     'CoalescedMouseData.h',
44     'CoalescedWheelData.h',
45     'ContentChild.h',
46     'ContentParent.h',
47     'ContentProcess.h',
48     'ContentProcessManager.h',
49     'CSPMessageUtils.h',
50     'DocShellMessageUtils.h',
51     'EffectsInfo.h',
52     'FilePickerParent.h',
53     'InProcessChild.h',
54     'InProcessParent.h',
55     'MaybeDiscarded.h',
56     'MemoryReportRequest.h',
57     'NativeThreadId.h',
58     'PermissionMessageUtils.h',
59     'ProcessActor.h',
60     'PropertyBagUtils.h',
61     'ReferrerInfoUtils.h',
62     'RefMessageBodyService.h',
63     'RemoteBrowser.h',
64     'RemoteType.h',
65     'RemoteWebProgress.h',
66     'RemoteWebProgressRequest.h',
67     'SharedMessageBody.h',
68     'TabContext.h',
69     'TabMessageTypes.h',
70     'TabMessageUtils.h',
71     'URLClassifierChild.h',
72     'URLClassifierParent.h',
73     'UserActivationIPCUtils.h',
74     'WindowGlobalActor.h',
75     'WindowGlobalChild.h',
76     'WindowGlobalParent.h',
79 EXPORTS.mozilla += [
80     'PreallocatedProcessManager.h',
81     'ProcessHangMonitor.h',
82     'ProcessHangMonitorIPC.h',
83     'ProcessPriorityManager.h',
86 UNIFIED_SOURCES += [
87     'BrowserBridgeChild.cpp',
88     'BrowserBridgeHost.cpp',
89     'BrowserBridgeParent.cpp',
90     'BrowserChild.cpp',
91     'BrowserHost.cpp',
92     'BrowserParent.cpp',
93     'ClonedErrorHolder.cpp',
94     'CoalescedMouseData.cpp',
95     'CoalescedWheelData.cpp',
96     'ColorPickerParent.cpp',
97     'ContentParent.cpp',
98     'ContentProcess.cpp',
99     'ContentProcessManager.cpp',
100     'CSPMessageUtils.cpp',
101     'DocShellMessageUtils.cpp',
102     'FilePickerParent.cpp',
103     'InProcessImpl.cpp',
104     'MemMapSnapshot.cpp',
105     'MemoryReportRequest.cpp',
106     'MMPrinter.cpp',
107     'PermissionMessageUtils.cpp',
108     'PreallocatedProcessManager.cpp',
109     'ProcessActor.cpp',
110     'ProcessPriorityManager.cpp',
111     'PropertyBagUtils.cpp',
112     'ReferrerInfoUtils.cpp',
113     'RefMessageBodyService.cpp',
114     'RemoteBrowser.cpp',
115     'RemoteWebProgress.cpp',
116     'RemoteWebProgressRequest.cpp',
117     'SharedMap.cpp',
118     'SharedMessageBody.cpp',
119     'SharedStringMap.cpp',
120     'StructuredCloneData.cpp',
121     'TabContext.cpp',
122     'TabMessageUtils.cpp',
123     'URLClassifierParent.cpp',
124     'WindowGlobalActor.cpp',
125     'WindowGlobalChild.cpp',
126     'WindowGlobalParent.cpp',
129 # ContentChild.cpp cannot be compiled in unified mode on  linux due to Time conflict
130 SOURCES += [
131     'ContentChild.cpp',
132     'ProcessHangMonitor.cpp',
135 PREPROCESSED_IPDL_SOURCES += [
136     'PBrowser.ipdl',
137     'PBrowserBridge.ipdl',
138     'PContent.ipdl',
141 IPDL_SOURCES += [
142     'DOMTypes.ipdlh',
143     'MemoryReportTypes.ipdlh',
144     'PColorPicker.ipdl',
145     'PContentPermission.ipdlh',
146     'PContentPermissionRequest.ipdl',
147     'PCycleCollectWithLogs.ipdl',
148     'PFilePicker.ipdl',
149     'PInProcess.ipdl',
150     'PLoginReputation.ipdl',
151     'PPluginWidget.ipdl',
152     'PProcessHangMonitor.ipdl',
153     'PrefsTypes.ipdlh',
154     'PTabContext.ipdlh',
155     'PURLClassifier.ipdl',
156     'PURLClassifierInfo.ipdlh',
157     'PURLClassifierLocal.ipdl',
158     'PWindowGlobal.ipdl',
159     'ServiceWorkerConfiguration.ipdlh',
160     'WindowGlobalTypes.ipdlh',
163 include('/ipc/chromium/chromium-config.mozbuild')
165 FINAL_LIBRARY = 'xul'
167 if CONFIG['MOZ_SANDBOX'] and (CONFIG['OS_TARGET'] in ['Darwin', 'Linux']):
168     USE_LIBS += [
169         'mozsandbox',
170     ]
172 LOCAL_INCLUDES += [
173     '/caps',
174     '/chrome',
175     '/docshell/base',
176     '/dom/base',
177     '/dom/bindings',
178     '/dom/events',
179     '/dom/filesystem',
180     '/dom/geolocation',
181     '/dom/media/webspeech/synth/ipc',
182     '/dom/security',
183     '/dom/storage',
184     '/extensions/spellcheck/src',
185     '/gfx/2d',
186     '/hal/sandbox',
187     '/js/xpconnect/loader',
188     '/js/xpconnect/src',
189     '/layout/base',
190     '/media/webrtc',
191     '/netwerk/base',
192     '/netwerk/protocol/http',
193     '/toolkit/components/printingui/ipc',
194     '/toolkit/crashreporter',
195     '/toolkit/xre',
196     '/uriloader/exthandler',
197     '/widget',
198     '/xpcom/base',
199     '/xpcom/threads',
202 if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
203     LOCAL_INCLUDES += [
204         '/security/sandbox/chromium',
205         '/security/sandbox/chromium-shim',
206     ]
208 if CONFIG['OS_ARCH'] != 'WINNT':
209     LOCAL_INCLUDES += [
210         '/modules/libjar',
211     ]
213 DEFINES['BIN_SUFFIX'] = '"%s"' % CONFIG['BIN_SUFFIX']
215 DEFINES['MOZ_APP_NAME'] = '"%s"' % CONFIG['MOZ_APP_NAME']
217 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
218     DEFINES['MOZ_ENABLE_FREETYPE'] = True
220 JAR_MANIFESTS += ['jar.mn']
222 BROWSER_CHROME_MANIFESTS += [
223     'tests/browser.ini',
224     'tests/JSProcessActor/browser.ini',
225     'tests/JSWindowActor/browser.ini',
228 MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
229 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
230 XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
232 CXXFLAGS += CONFIG['TK_CFLAGS']
234 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
235     CXXFLAGS += ['-Wno-error=shadow']
237 if CONFIG['FUZZING'] and CONFIG['FUZZING_INTERFACES']:
238     TEST_DIRS += [
239         'fuzztest'
240     ]
242 # Add libFuzzer configuration directives
243 include('/tools/fuzzing/libfuzzer-config.mozbuild')