Bug 1932613 - temporarily disable browser_ml_end_to_end.js for permanent failures...
[gecko.git] / xpcom / base / moz.build
blob5f01b7b13643141b2054e16e6e8874eccf17407c
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 XPIDL_SOURCES += [
8     "nsIAvailableMemoryWatcherBase.idl",
9     "nsIConsoleListener.idl",
10     "nsIConsoleMessage.idl",
11     "nsIConsoleService.idl",
12     "nsICycleCollectorListener.idl",
13     "nsIDebug2.idl",
14     "nsIException.idl",
15     "nsIInterfaceRequestor.idl",
16     "nsIMemoryInfoDumper.idl",
17     "nsIMemoryReporter.idl",
18     "nsISecurityConsoleMessage.idl",
19     "nsISupports.idl",
20     "nsIUUIDGenerator.idl",
21     "nsIVersionComparator.idl",
22     "nsIWeakReference.idl",
23     "nsrootidl.idl",
26 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
27     XPIDL_SOURCES += [
28         "nsIMacPreferencesReader.idl",
29     ]
30     EXPORTS.mozilla += [
31         "MacHelpers.h",
32         "nsMacPreferencesReader.h",
33     ]
34     UNIFIED_SOURCES += [
35         "MacHelpers.mm",
36         "nsMacPreferencesReader.mm",
37     ]
38 if CONFIG["OS_ARCH"] == "Darwin":
39     EXPORTS += [
40         "CFTypeRefPtr.h",
41         "nsObjCExceptions.h",
42     ]
43     EXPORTS.mozilla += [
44         "DarwinObjectPtr.h",
45         "MacStringHelpers.h",
46     ]
47     UNIFIED_SOURCES += [
48         "MacStringHelpers.mm",
49         "nsObjCExceptions.mm",
50     ]
52 XPIDL_MODULE = "xpcom_base"
54 XPCOM_MANIFESTS += [
55     "components.conf",
58 EXPORTS += [
59     "!ErrorList.h",
60     "!ErrorNamesInternal.h",
61     "CodeAddressService.h",
62     "nsAlgorithm.h",
63     "nsAutoRef.h",
64     "nsCom.h",
65     "nsCOMPtr.h",
66     "nscore.h",
67     "nsCRTGlue.h",
68     "nsCycleCollectionNoteChild.h",
69     "nsCycleCollectionNoteRootCallback.h",
70     "nsCycleCollectionParticipant.h",
71     "nsCycleCollectionTraversalCallback.h",
72     "nsCycleCollector.h",
73     "nsDebug.h",
74     "nsDebugImpl.h",
75     "nsDumpUtils.h",
76     "nsError.h",
77     "nsGZFileWriter.h",
78     "nsIClassInfoImpl.h",
79     "nsID.h",
80     "nsIDUtils.h",
81     "nsIInterfaceRequestorUtils.h",
82     "nsINIParser.h",
83     "nsInterfaceRequestorAgg.h",
84     "nsISizeOf.h",
85     "nsISupportsImpl.h",
86     "nsISupportsUtils.h",
87     "nsIWeakReferenceUtils.h",
88     "nsMaybeWeakPtr.h",
89     "nsMemory.h",
90     "nsMemoryReporterManager.h",
91     "nsQueryObject.h",
92     "nsSystemInfo.h",
93     "nsTraceRefcnt.h",
94     "nsVersionComparator.h",
95     "nsWeakReference.h",
98 if CONFIG["OS_ARCH"] == "WINNT":
99     EXPORTS += [
100         "nsWindowsHelpers.h",
101     ]
102     if CONFIG["CC_TYPE"] not in ("gcc", "clang"):
103         OS_LIBS += [
104             "wscapi",
105         ]
107 EXPORTS.mozilla += [
108     "AppShutdown.h",
109     "AutoRestore.h",
110     "AvailableMemoryTracker.h",
111     "AvailableMemoryWatcher.h",
112     "ClearOnShutdown.h",
113     "CountingAllocatorBase.h",
114     "CycleCollectedJSContext.h",
115     "CycleCollectedJSRuntime.h",
116     "CycleCollectorStats.h",
117     "Debug.h",
118     "DebuggerOnGCRunnable.h",
119     "DeferredFinalize.h",
120     "EnumeratedArrayCycleCollection.h",
121     "ErrorNames.h",
122     "GkRustUtils.h",
123     "HoldDropJSObjects.h",
124     "IntentionalCrash.h",
125     "JSObjectHolder.h",
126     "JSONStringWriteFuncs.h",
127     "Logging.h",
128     "MemoryInfo.h",
129     "MemoryMapping.h",
130     "MemoryReportingProcess.h",
131     "MemoryTelemetry.h",
132     "nsMemoryInfoDumper.h",
133     "NSPRLogModulesParser.h",
134     "OwningNonNull.h",
135     "RLBoxSandboxPool.h",
136     "RLBoxUtils.h",
137     "ShutdownPhase.h",
138     "SizeOfState.h",
139     "StaticLocalPtr.h",
140     "StaticMonitor.h",
141     "StaticMutex.h",
142     "StaticPtr.h",
145 SOURCES += [
146     # nsDebugImpl isn't unified because we disable PGO so that NS_ABORT_OOM isn't
147     # optimized away oddly.
148     "nsDebugImpl.cpp",
149     # nsDumpUtils.cpp includes SpecialSystemDirectory.h which includes
150     # nsLocalFileMac.h which upsets other files in this dir that have a different
151     # idea about what `TextRange` means.
152     "nsDumpUtils.cpp",
154 SOURCES["nsDebugImpl.cpp"].no_pgo = True
156 UNIFIED_SOURCES += [
157     "AppShutdown.cpp",
158     "AvailableMemoryTracker.cpp",
159     "AvailableMemoryWatcher.cpp",
160     "ClearOnShutdown.cpp",
161     "CycleCollectedJSContext.cpp",
162     "CycleCollectedJSRuntime.cpp",
163     "CycleCollectorStats.cpp",
164     "Debug.cpp",
165     "DebuggerOnGCRunnable.cpp",
166     "DeferredFinalize.cpp",
167     "ErrorNames.cpp",
168     "GkRustUtils.cpp",
169     "HoldDropJSObjects.cpp",
170     "JSObjectHolder.cpp",
171     "LogCommandLineHandler.cpp",
172     "Logging.cpp",
173     "LogModulePrefWatcher.cpp",
174     "MemoryTelemetry.cpp",
175     "nsClassInfoImpl.cpp",
176     "nsCOMPtr.cpp",
177     "nsConsoleMessage.cpp",
178     "nsConsoleService.cpp",
179     "nsCRTGlue.cpp",
180     "nsCycleCollectionParticipant.cpp",
181     "nsCycleCollector.cpp",
182     "nsCycleCollectorTraceJSHelpers.cpp",
183     "nsGZFileWriter.cpp",
184     "nsID.cpp",
185     "nsIInterfaceRequestorUtils.cpp",
186     "nsINIParser.cpp",
187     "nsInterfaceRequestorAgg.cpp",
188     "nsISupportsImpl.cpp",
189     "nsMemoryImpl.cpp",
190     "nsMemoryInfoDumper.cpp",
191     "nsMemoryReporterManager.cpp",
192     "NSPRLogModulesParser.cpp",
193     "nsSecurityConsoleMessage.cpp",
194     "nsSystemInfo.cpp",
195     "nsTraceRefcnt.cpp",
196     "nsUUIDGenerator.cpp",
197     "nsVersionComparator.cpp",
198     "nsVersionComparatorImpl.cpp",
199     "nsWeakReference.cpp",
200     "RLBoxSandboxPool.cpp",
203 if CONFIG["OS_TARGET"] in ("Linux", "Android"):
204     UNIFIED_SOURCES += [
205         "MemoryMapping.cpp",
206     ]
208 if CONFIG["OS_TARGET"] == "WINNT":
209     UNIFIED_SOURCES += [
210         "AvailableMemoryWatcherWin.cpp",
211         "MemoryInfo.cpp",
212     ]
214 if CONFIG["OS_TARGET"] == "Darwin":
215     UNIFIED_SOURCES += [
216         "AvailableMemoryWatcherMac.cpp",
217     ]
218     EXPORTS.mozilla += [
219         "MemoryPressureLevelMac.h",
220     ]
222 if CONFIG["OS_TARGET"] == "Linux":
223     UNIFIED_SOURCES += [
224         "AvailableMemoryWatcherLinux.cpp",
225     ]
226     EXPORTS.mozilla += [
227         "AvailableMemoryWatcherUtils.h",
228     ]
230 if CONFIG["MOZ_PHC"]:
231     DEFINES["MOZ_PHC"] = True
233 GeneratedFile("ErrorList.h", script="ErrorList.py", entry_point="error_list_h")
234 GeneratedFile(
235     "ErrorNamesInternal.h", script="ErrorList.py", entry_point="error_names_internal_h"
237 GeneratedFile("error_list.rs", script="ErrorList.py", entry_point="error_list_rs")
239 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
240     SOURCES += [
241         "nsMacUtilsImpl.cpp",
242     ]
243 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
244     SOURCES += [
245         "nsCrashOnException.cpp",
246     ]
248 if CONFIG["COMPILE_ENVIRONMENT"]:
249     EXPORTS.mozilla += [
250         "!gk_rust_utils_ffi_generated.h",
251     ]
253     CbindgenHeader("gk_rust_utils_ffi_generated.h", inputs=["/xpcom/rust/gkrust_utils"])
255 include("/ipc/chromium/chromium-config.mozbuild")
257 FINAL_LIBRARY = "xul"
259 LOCAL_INCLUDES += [
260     "../build",
261     "/dom/base",
262     "/mfbt",
263     "/netwerk/base",
264     "/xpcom/ds",
267 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
268     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
270 if CONFIG["MOZ_PHC"]:
271     EXPORTS.mozilla += [
272         "PHCManager.h",
273     ]
275     DEFINES["MOZ_PHC"] = 1
277     UNIFIED_SOURCES += ["PHCManager.cpp"]
279 with Files("PHCManager.*"):
280     BUG_COMPONENT = ("Core", "Memory Allocator")