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/.
8 "nsIAvailableMemoryWatcherBase.idl",
9 "nsIConsoleListener.idl",
10 "nsIConsoleMessage.idl",
11 "nsIConsoleService.idl",
12 "nsICycleCollectorListener.idl",
15 "nsIInterfaceRequestor.idl",
16 "nsIMemoryInfoDumper.idl",
17 "nsIMemoryReporter.idl",
18 "nsISecurityConsoleMessage.idl",
20 "nsIUUIDGenerator.idl",
21 "nsIVersionComparator.idl",
22 "nsIWeakReference.idl",
26 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
28 "nsIMacPreferencesReader.idl",
32 "nsMacPreferencesReader.h",
36 "nsMacPreferencesReader.mm",
38 if CONFIG["OS_ARCH"] == "Darwin":
48 "MacStringHelpers.mm",
49 "nsObjCExceptions.mm",
52 XPIDL_MODULE = "xpcom_base"
60 "!ErrorNamesInternal.h",
61 "CodeAddressService.h",
68 "nsCycleCollectionNoteChild.h",
69 "nsCycleCollectionNoteRootCallback.h",
70 "nsCycleCollectionParticipant.h",
71 "nsCycleCollectionTraversalCallback.h",
81 "nsIInterfaceRequestorUtils.h",
83 "nsInterfaceRequestorAgg.h",
87 "nsIWeakReferenceUtils.h",
90 "nsMemoryReporterManager.h",
94 "nsVersionComparator.h",
98 if CONFIG["OS_ARCH"] == "WINNT":
100 "nsWindowsHelpers.h",
102 if CONFIG["CC_TYPE"] not in ("gcc", "clang"):
110 "AvailableMemoryTracker.h",
111 "AvailableMemoryWatcher.h",
113 "CountingAllocatorBase.h",
114 "CycleCollectedJSContext.h",
115 "CycleCollectedJSRuntime.h",
116 "CycleCollectorStats.h",
118 "DebuggerOnGCRunnable.h",
119 "DeferredFinalize.h",
120 "EnumeratedArrayCycleCollection.h",
123 "HoldDropJSObjects.h",
124 "IntentionalCrash.h",
126 "JSONStringWriteFuncs.h",
130 "MemoryReportingProcess.h",
132 "nsMemoryInfoDumper.h",
133 "NSPRLogModulesParser.h",
135 "RLBoxSandboxPool.h",
146 # nsDebugImpl isn't unified because we disable PGO so that NS_ABORT_OOM isn't
147 # optimized away oddly.
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.
154 SOURCES["nsDebugImpl.cpp"].no_pgo = True
158 "AvailableMemoryTracker.cpp",
159 "AvailableMemoryWatcher.cpp",
160 "ClearOnShutdown.cpp",
161 "CycleCollectedJSContext.cpp",
162 "CycleCollectedJSRuntime.cpp",
163 "CycleCollectorStats.cpp",
165 "DebuggerOnGCRunnable.cpp",
166 "DeferredFinalize.cpp",
169 "HoldDropJSObjects.cpp",
170 "JSObjectHolder.cpp",
171 "LogCommandLineHandler.cpp",
173 "LogModulePrefWatcher.cpp",
174 "MemoryTelemetry.cpp",
175 "nsClassInfoImpl.cpp",
177 "nsConsoleMessage.cpp",
178 "nsConsoleService.cpp",
180 "nsCycleCollectionParticipant.cpp",
181 "nsCycleCollector.cpp",
182 "nsCycleCollectorTraceJSHelpers.cpp",
183 "nsGZFileWriter.cpp",
185 "nsIInterfaceRequestorUtils.cpp",
187 "nsInterfaceRequestorAgg.cpp",
188 "nsISupportsImpl.cpp",
190 "nsMemoryInfoDumper.cpp",
191 "nsMemoryReporterManager.cpp",
192 "NSPRLogModulesParser.cpp",
193 "nsSecurityConsoleMessage.cpp",
196 "nsUUIDGenerator.cpp",
197 "nsVersionComparator.cpp",
198 "nsVersionComparatorImpl.cpp",
199 "nsWeakReference.cpp",
200 "RLBoxSandboxPool.cpp",
203 if CONFIG["OS_TARGET"] in ("Linux", "Android"):
208 if CONFIG["OS_TARGET"] == "WINNT":
210 "AvailableMemoryWatcherWin.cpp",
214 if CONFIG["OS_TARGET"] == "Darwin":
216 "AvailableMemoryWatcherMac.cpp",
219 "MemoryPressureLevelMac.h",
222 if CONFIG["OS_TARGET"] == "Linux":
224 "AvailableMemoryWatcherLinux.cpp",
227 "AvailableMemoryWatcherUtils.h",
230 if CONFIG["MOZ_PHC"]:
231 DEFINES["MOZ_PHC"] = True
233 GeneratedFile("ErrorList.h", script="ErrorList.py", entry_point="error_list_h")
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":
241 "nsMacUtilsImpl.cpp",
243 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
245 "nsCrashOnException.cpp",
248 if CONFIG["COMPILE_ENVIRONMENT"]:
250 "!gk_rust_utils_ffi_generated.h",
253 CbindgenHeader("gk_rust_utils_ffi_generated.h", inputs=["/xpcom/rust/gkrust_utils"])
255 include("/ipc/chromium/chromium-config.mozbuild")
257 FINAL_LIBRARY = "xul"
267 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
268 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
270 if CONFIG["MOZ_PHC"]:
275 DEFINES["MOZ_PHC"] = 1
277 UNIFIED_SOURCES += ["PHCManager.cpp"]
279 with Files("PHCManager.*"):
280 BUG_COMPONENT = ("Core", "Memory Allocator")