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",
36 "nsMacPreferencesReader.h",
40 "MacStringHelpers.mm",
41 "nsMacPreferencesReader.mm",
42 "nsObjCExceptions.mm",
45 XPIDL_MODULE = "xpcom_base"
53 "!ErrorNamesInternal.h",
54 "CodeAddressService.h",
61 "nsCycleCollectionNoteChild.h",
62 "nsCycleCollectionNoteRootCallback.h",
63 "nsCycleCollectionParticipant.h",
64 "nsCycleCollectionTraversalCallback.h",
74 "nsIInterfaceRequestorUtils.h",
76 "nsInterfaceRequestorAgg.h",
80 "nsIWeakReferenceUtils.h",
83 "nsMemoryReporterManager.h",
87 "nsVersionComparator.h",
91 if CONFIG["OS_ARCH"] == "WINNT":
95 if CONFIG["CC_TYPE"] not in ("gcc", "clang"):
103 "AvailableMemoryTracker.h",
104 "AvailableMemoryWatcher.h",
106 "CountingAllocatorBase.h",
107 "CycleCollectedJSContext.h",
108 "CycleCollectedJSRuntime.h",
110 "DebuggerOnGCRunnable.h",
111 "DeferredFinalize.h",
112 "EnumeratedArrayCycleCollection.h",
115 "HoldDropJSObjects.h",
116 "IntentionalCrash.h",
118 "JSONStringWriteFuncs.h",
122 "MemoryReportingProcess.h",
124 "nsMemoryInfoDumper.h",
125 "NSPRLogModulesParser.h",
127 "RLBoxSandboxPool.h",
138 # nsDebugImpl isn't unified because we disable PGO so that NS_ABORT_OOM isn't
139 # optimized away oddly.
141 # nsDumpUtils.cpp includes SpecialSystemDirectory.h which includes
142 # nsLocalFileMac.h which upsets other files in this dir that have a different
143 # idea about what `TextRange` means.
146 SOURCES["nsDebugImpl.cpp"].no_pgo = True
150 "AvailableMemoryTracker.cpp",
151 "AvailableMemoryWatcher.cpp",
152 "ClearOnShutdown.cpp",
153 "CycleCollectedJSContext.cpp",
154 "CycleCollectedJSRuntime.cpp",
156 "DebuggerOnGCRunnable.cpp",
157 "DeferredFinalize.cpp",
160 "HoldDropJSObjects.cpp",
161 "JSObjectHolder.cpp",
162 "LogCommandLineHandler.cpp",
164 "LogModulePrefWatcher.cpp",
165 "MemoryTelemetry.cpp",
166 "nsClassInfoImpl.cpp",
168 "nsConsoleMessage.cpp",
169 "nsConsoleService.cpp",
171 "nsCycleCollectionParticipant.cpp",
172 "nsCycleCollector.cpp",
173 "nsCycleCollectorTraceJSHelpers.cpp",
174 "nsGZFileWriter.cpp",
176 "nsIInterfaceRequestorUtils.cpp",
178 "nsInterfaceRequestorAgg.cpp",
179 "nsISupportsImpl.cpp",
181 "nsMemoryInfoDumper.cpp",
182 "nsMemoryReporterManager.cpp",
183 "NSPRLogModulesParser.cpp",
184 "nsSecurityConsoleMessage.cpp",
187 "nsUUIDGenerator.cpp",
188 "nsVersionComparator.cpp",
189 "nsVersionComparatorImpl.cpp",
190 "nsWeakReference.cpp",
191 "RLBoxSandboxPool.cpp",
194 if CONFIG["OS_TARGET"] in ("Linux", "Android"):
199 if CONFIG["OS_TARGET"] == "WINNT":
201 "AvailableMemoryWatcherWin.cpp",
205 if CONFIG["OS_TARGET"] == "Darwin":
207 "AvailableMemoryWatcherMac.cpp",
210 "MemoryPressureLevelMac.h",
213 if CONFIG["OS_TARGET"] == "Linux":
215 "AvailableMemoryWatcherLinux.cpp",
218 "AvailableMemoryWatcherUtils.h",
221 if CONFIG["MOZ_PHC"]:
222 DEFINES["MOZ_PHC"] = True
224 GeneratedFile("ErrorList.h", script="ErrorList.py", entry_point="error_list_h")
226 "ErrorNamesInternal.h", script="ErrorList.py", entry_point="error_names_internal_h"
228 GeneratedFile("error_list.rs", script="ErrorList.py", entry_point="error_list_rs")
230 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
232 "nsMacUtilsImpl.cpp",
234 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
236 "nsCrashOnException.cpp",
239 if CONFIG["COMPILE_ENVIRONMENT"]:
241 "!gk_rust_utils_ffi_generated.h",
244 CbindgenHeader("gk_rust_utils_ffi_generated.h", inputs=["/xpcom/rust/gkrust_utils"])
246 include("/ipc/chromium/chromium-config.mozbuild")
248 FINAL_LIBRARY = "xul"
258 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
259 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
261 if CONFIG["MOZ_PHC"]:
266 DEFINES["MOZ_PHC"] = 1
268 UNIFIED_SOURCES += ["PHCManager.cpp"]
270 with Files("PHCManager.*"):
271 BUG_COMPONENT = ("Core", "Memory Allocator")