Bug 1888590 - Mark some subtests on trusted-types-event-handlers.html as failing...
[gecko.git] / toolkit / xre / moz.build
blob778ea4415150708fc1f977283b4ace4aee2b7141
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 include("../components/telemetry/telemetry-constants.mozbuild")
9 with Files("**"):
10     BUG_COMPONENT = ("Toolkit", "Startup and Profile System")
12 if CONFIG["OS_ARCH"] == "WINNT":
13     TEST_DIRS += ["test/win"]
15 MOCHITEST_MANIFESTS += ["test/mochitest.toml"]
16 BROWSER_CHROME_MANIFESTS += ["test/browser.toml"]
17 XPCSHELL_TESTS_MANIFESTS += ["test/xpcshell.toml"]
18 MARIONETTE_MANIFESTS += ["test/marionette/marionette.toml"]
20 XPIDL_SOURCES += [
21     "nsINativeAppSupport.idl",
22     "nsIXREDirProvider.idl",
25 if CONFIG["OS_ARCH"] == "WINNT":
26     XPIDL_SOURCES += [
27         "nsIWinAppHelper.idl",
28     ]
30 XPIDL_MODULE = "xulapp"
32 EXPORTS += [
33     "nsAppRunner.h",
36 EXPORTS.mozilla += [
37     "AutoSQLiteLifetime.h",
38     "Bootstrap.h",
39     "CmdLineAndEnvUtils.h",
40     "GeckoArgs.h",
41     "MultiInstanceLock.h",
42     "SafeMode.h",
45 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
46     EXPORTS += ["EventTracer.h"]
48 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
49     EXPORTS.mozilla += [
50         "AssembleCmdLine.h",
51         "DllPrefetchExperimentRegistryInfo.h",
52         "PolicyChecks.h",
53         "WinTokenUtils.h",
54     ]
55     UNIFIED_SOURCES += [
56         "/toolkit/mozapps/update/common/pathhash.cpp",
57         "/toolkit/mozapps/update/common/updateutils_win.cpp",
58         "DllPrefetchExperimentRegistryInfo.cpp",
59         "nsNativeAppSupportWin.cpp",
60         "WinTokenUtils.cpp",
61     ]
62     DEFINES["PROXY_PRINTING"] = 1
63     LOCAL_INCLUDES += [
64         "../components/printingui",
65     ]
66     if CONFIG["MOZ_LAUNCHER_PROCESS"]:
67         EXPORTS.mozilla += [
68             "LauncherRegistryInfo.h",
69         ]
70         UNIFIED_SOURCES += [
71             "LauncherRegistryInfo.cpp",
72         ]
73     DIRS += [
74         "dllservices",
75     ]
76 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
77     EXPORTS.mozilla += [
78         "MacRunFromDmgUtils.h",
79     ]
80     UNIFIED_SOURCES += [
81         "MacApplicationDelegate.mm",
82         "MacAutoreleasePool.mm",
83         "MacLaunchHelper.mm",
84         "MacRunFromDmgUtils.mm",
85         "nsCommandLineServiceMac.mm",
86         "nsNativeAppSupportCocoa.mm",
87         "updaterfileutils_osx.mm",
88     ]
89     DEFINES["PROXY_PRINTING"] = 1
90     LOCAL_INCLUDES += [
91         "../components/printingui",
92     ]
93 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
94     UNIFIED_SOURCES += [
95         "nsNativeAppSupportDefault.cpp",
96         "UIKitDirProvider.mm",
97     ]
98 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
99     UNIFIED_SOURCES += [
100         "nsNativeAppSupportUnix.cpp",
101     ]
102     CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"]
103 else:
104     UNIFIED_SOURCES += [
105         "nsNativeAppSupportDefault.cpp",
106     ]
108 if CONFIG["MOZ_HAS_REMOTE"]:
109     LOCAL_INCLUDES += [
110         "../components/remote",
111     ]
113 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
114     UNIFIED_SOURCES += [
115         "nsGDKErrorHandler.cpp",
116     ]
117     LOCAL_INCLUDES += [
118         "/widget",
119         "/widget/gtk",
120     ]
122 if CONFIG["MOZ_X11"]:
123     EXPORTS += ["nsX11ErrorHandler.h"]
124     UNIFIED_SOURCES += [
125         "nsX11ErrorHandler.cpp",
126     ]
128 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
129     UNIFIED_SOURCES += [
130         "nsAndroidStartup.cpp",
131     ]
133 if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
134     UNIFIED_SOURCES += [
135         "MultiInstanceLock.cpp",
136     ]
138 UNIFIED_SOURCES += [
139     "/toolkit/mozapps/update/common/commonupdatedir.cpp",
140     "AutoSQLiteLifetime.cpp",
141     "Bootstrap.cpp",
142     "CmdLineAndEnvUtils.cpp",
143     "CreateAppData.cpp",
144     "nsConsoleWriter.cpp",
145     "nsNativeAppSupportBase.cpp",
146     "nsSigHandlers.cpp",
147     "nsXREDirProvider.cpp",
150 # nsAppRunner.cpp and ProfileReset.cpp cannot be built in unified mode because
151 # they pull in OS X system headers.
152 # nsEmbedFunctions.cpp cannot be built in unified mode because it pulls in X11 headers.
153 SOURCES += [
154     "../../other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp",
155     "nsAppRunner.cpp",
156     "nsEmbedFunctions.cpp",
157     "ProfileReset.cpp",
160 if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
161     UNIFIED_SOURCES += [
162         "EventTracer.cpp",
163     ]
165 if CONFIG["MOZ_UPDATER"]:
166     if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
167         UNIFIED_SOURCES += [
168             "nsUpdateDriver.cpp",
169             "nsUpdateSyncManager.cpp",
170         ]
172 if CONFIG["MOZ_PDF_PRINTING"]:
173     DEFINES["PROXY_PRINTING"] = 1
174     LOCAL_INCLUDES += [
175         "../components/printingui",
176     ]
178 XPCOM_MANIFESTS += [
179     "components.conf",
182 include("/ipc/chromium/chromium-config.mozbuild")
184 FINAL_LIBRARY = "xul"
186 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
187     DEFINES["USE_GLX_TEST"] = True
188     DIRS += ["glxtest"]
190 for var in (
191     "MOZ_APP_NAME",
192     "MOZ_APP_BASENAME",
193     "MOZ_APP_DISPLAYNAME",
194     "MOZ_APP_VENDOR",
195     "MOZ_APP_VERSION",
196     "OS_TARGET",
197     "MOZ_WIDGET_TOOLKIT",
199     DEFINES[var] = '"%s"' % CONFIG[var]
201 if CONFIG["MOZ_DEFAULT_BROWSER_AGENT"] and CONFIG["OS_ARCH"] == "WINNT":
202     DEFINES["MOZ_DEFAULT_BROWSER_AGENT"] = CONFIG["MOZ_DEFAULT_BROWSER_AGENT"]
204 if CONFIG["MOZ_UPDATER"] and CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
205     DEFINES["MOZ_UPDATER"] = True
207 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
208     DEFINES["WIN32_LEAN_AND_MEAN"] = True
209     DEFINES["UNICODE"] = True
210     DEFINES["_UNICODE"] = True
212 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
213     DEFINES["ANDROID_PACKAGE_NAME"] = '"%s"' % CONFIG["ANDROID_PACKAGE_NAME"]
215 DEFINES["MOZ_DISTRIBUTION_ID"] = '"%s"' % CONFIG["MOZ_DISTRIBUTION_ID"]
217 if CONFIG["TARGET_XPCOM_ABI"]:
218     DEFINES["TARGET_OS_ABI"] = '"%s_%s"' % (
219         CONFIG["OS_TARGET"],
220         CONFIG["TARGET_XPCOM_ABI"],
221     )
223 if CONFIG["OS_ARCH"] == "Linux" and "lib64" in CONFIG["libdir"]:
224     DEFINES["HAVE_USR_LIB64_DIR"] = True
226 DEFINES["GRE_MILESTONE"] = CONFIG["GRE_MILESTONE"]
227 DEFINES["MOZ_APP_VERSION_DISPLAY"] = CONFIG["MOZ_APP_VERSION_DISPLAY"]
229 for var in ("APP_VERSION", "APP_ID"):
230     DEFINES[var] = CONFIG["MOZ_%s" % var]
232 if CONFIG["MOZ_BUILD_APP"] == "browser":
233     DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
235 if CONFIG["MOZ_USE_NSS_FOR_MAR"]:
236     DEFINES["MAR_NSS"] = True
238 LOCAL_INCLUDES += [
239     "../../other-licenses/nsis/Contrib/CityHash/cityhash",
240     "../components/find",
241     "../components/printingui/ipc",
242     "../components/windowwatcher",
243     "../mozapps/update/common",
244     "../profile",
245     "/config",
246     "/dom/base",
247     "/dom/commandhandler",
248     "/dom/ipc",
249     "/dom/webbrowserpersist",
250     "/testing/gtest/mozilla",
251     "/toolkit/crashreporter",
252     "/xpcom/build",
255 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "WINNT":
256     LOCAL_INCLUDES += [
257         "/security/sandbox/chromium",
258         "/security/sandbox/chromium-shim",
259     ]
261 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "Linux":
262     USE_LIBS += [
263         "mozsandbox",
264     ]
266 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
267     LOCAL_INCLUDES += [
268         "/widget",
269         "/widget/cocoa",
270         "/xpcom/base",
271     ]
273 CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"]
275 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
276     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
277     CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
279 DEFINES["TOPOBJDIR"] = TOPOBJDIR
281 if not CONFIG["MOZ_ARTIFACT_BUILDS"]:
282     FINAL_TARGET_PP_FILES += ["platform.ini"]
284 if CONFIG["ENABLE_TESTS"]:
285     DIRS += ["test/gtest"]