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