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",
117 "DebuggerOnGCRunnable.h",
118 "DeferredFinalize.h",
119 "EnumeratedArrayCycleCollection.h",
122 "HoldDropJSObjects.h",
123 "IntentionalCrash.h",
125 "JSONStringWriteFuncs.h",
129 "MemoryReportingProcess.h",
131 "nsMemoryInfoDumper.h",
132 "NSPRLogModulesParser.h",
134 "RLBoxSandboxPool.h",
145 # nsDebugImpl isn't unified because we disable PGO so that NS_ABORT_OOM isn't
146 # optimized away oddly.
148 # nsDumpUtils.cpp includes SpecialSystemDirectory.h which includes
149 # nsLocalFileMac.h which upsets other files in this dir that have a different
150 # idea about what `TextRange` means.
153 SOURCES["nsDebugImpl.cpp"].no_pgo = True
157 "AvailableMemoryTracker.cpp",
158 "AvailableMemoryWatcher.cpp",
159 "ClearOnShutdown.cpp",
160 "CycleCollectedJSContext.cpp",
161 "CycleCollectedJSRuntime.cpp",
163 "DebuggerOnGCRunnable.cpp",
164 "DeferredFinalize.cpp",
167 "HoldDropJSObjects.cpp",
168 "JSObjectHolder.cpp",
169 "LogCommandLineHandler.cpp",
171 "LogModulePrefWatcher.cpp",
172 "MemoryTelemetry.cpp",
173 "nsClassInfoImpl.cpp",
175 "nsConsoleMessage.cpp",
176 "nsConsoleService.cpp",
178 "nsCycleCollectionParticipant.cpp",
179 "nsCycleCollector.cpp",
180 "nsCycleCollectorTraceJSHelpers.cpp",
181 "nsGZFileWriter.cpp",
183 "nsIInterfaceRequestorUtils.cpp",
185 "nsInterfaceRequestorAgg.cpp",
186 "nsISupportsImpl.cpp",
188 "nsMemoryInfoDumper.cpp",
189 "nsMemoryReporterManager.cpp",
190 "NSPRLogModulesParser.cpp",
191 "nsSecurityConsoleMessage.cpp",
194 "nsUUIDGenerator.cpp",
195 "nsVersionComparator.cpp",
196 "nsVersionComparatorImpl.cpp",
197 "nsWeakReference.cpp",
198 "RLBoxSandboxPool.cpp",
201 if CONFIG["OS_TARGET"] in ("Linux", "Android"):
206 if CONFIG["OS_TARGET"] == "WINNT":
208 "AvailableMemoryWatcherWin.cpp",
212 if CONFIG["OS_TARGET"] == "Darwin":
214 "AvailableMemoryWatcherMac.cpp",
217 "MemoryPressureLevelMac.h",
220 if CONFIG["OS_TARGET"] == "Linux":
222 "AvailableMemoryWatcherLinux.cpp",
225 "AvailableMemoryWatcherUtils.h",
228 if CONFIG["MOZ_PHC"]:
229 DEFINES["MOZ_PHC"] = True
231 GeneratedFile("ErrorList.h", script="ErrorList.py", entry_point="error_list_h")
233 "ErrorNamesInternal.h", script="ErrorList.py", entry_point="error_names_internal_h"
235 GeneratedFile("error_list.rs", script="ErrorList.py", entry_point="error_list_rs")
237 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
239 "nsMacUtilsImpl.cpp",
241 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
243 "nsCrashOnException.cpp",
246 if CONFIG["COMPILE_ENVIRONMENT"]:
248 "!gk_rust_utils_ffi_generated.h",
251 CbindgenHeader("gk_rust_utils_ffi_generated.h", inputs=["/xpcom/rust/gkrust_utils"])
253 include("/ipc/chromium/chromium-config.mozbuild")
255 FINAL_LIBRARY = "xul"
265 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
266 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
268 if CONFIG["MOZ_PHC"]:
273 DEFINES["MOZ_PHC"] = 1
275 UNIFIED_SOURCES += ["PHCManager.cpp"]
277 with Files("PHCManager.*"):
278 BUG_COMPONENT = ("Core", "Memory Allocator")