michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: XPIDL_SOURCES += [ michael@0: 'nsIConsoleListener.idl', michael@0: 'nsIConsoleMessage.idl', michael@0: 'nsIConsoleService.idl', michael@0: 'nsICycleCollectorListener.idl', michael@0: 'nsIDebug.idl', michael@0: 'nsIDebug2.idl', michael@0: 'nsIErrorService.idl', michael@0: 'nsIException.idl', michael@0: 'nsIGZFileWriter.idl', michael@0: 'nsIInterfaceRequestor.idl', michael@0: 'nsIMemory.idl', michael@0: 'nsIMemoryInfoDumper.idl', michael@0: 'nsIMemoryReporter.idl', michael@0: 'nsIMessageLoop.idl', michael@0: 'nsIMutable.idl', michael@0: 'nsIProgrammingLanguage.idl', michael@0: 'nsISecurityConsoleMessage.idl', michael@0: 'nsIStatusReporter.idl', michael@0: 'nsISupports.idl', michael@0: 'nsIUUIDGenerator.idl', michael@0: 'nsIVersionComparator.idl', michael@0: 'nsIVisualEventTracer.idl', michael@0: 'nsIWeakReference.idl', michael@0: 'nsrootidl.idl', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': michael@0: XPIDL_SOURCES += [ michael@0: 'nsIMacUtils.idl', michael@0: ] michael@0: michael@0: XPIDL_MODULE = 'xpcom_base' michael@0: michael@0: EXPORTS += [ michael@0: 'ErrorList.h', michael@0: 'nsAgg.h', michael@0: 'nsAutoPtr.h', michael@0: 'nsAutoRef.h', michael@0: 'nsCom.h', michael@0: 'nscore.h', michael@0: 'nsCycleCollector.h', michael@0: 'nsDebugImpl.h', michael@0: 'nsError.h', michael@0: 'nsGZFileWriter.h', michael@0: 'nsIID.h', michael@0: 'nsInterfaceRequestorAgg.h', michael@0: 'nsISizeOf.h', michael@0: 'nsISupportsBase.h', michael@0: 'nsISupportsObsolete.h', michael@0: 'nsObjCExceptions.h', michael@0: 'nsStackWalk.h', michael@0: 'nsTraceRefcnt.h', michael@0: 'nsWeakPtr.h', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'WINNT': michael@0: EXPORTS += [ michael@0: 'nsWindowsHelpers.h', michael@0: ] michael@0: if CONFIG['MOZ_DEBUG']: michael@0: EXPORTS += ['pure.h'] michael@0: SOURCES += ['pure_api.c'] michael@0: michael@0: EXPORTS.mozilla += [ michael@0: 'AvailableMemoryTracker.h', michael@0: 'ClearOnShutdown.h', michael@0: 'CycleCollectedJSRuntime.h', michael@0: 'Debug.h', michael@0: 'nsMemoryInfoDumper.h', michael@0: 'StackWalk.h', michael@0: 'StaticMutex.h', michael@0: 'StaticPtr.h', michael@0: 'SystemMemoryReporter.h', michael@0: 'VisualEventTracer.h', michael@0: ] michael@0: michael@0: # nsDebugImpl isn't unified because we disable PGO so that NS_ABORT_OOM isn't michael@0: # optimized away oddly. michael@0: SOURCES += [ michael@0: 'nsDebugImpl.cpp', michael@0: ] michael@0: SOURCES['nsDebugImpl.cpp'].no_pgo = True michael@0: michael@0: UNIFIED_SOURCES += [ michael@0: 'AvailableMemoryTracker.cpp', michael@0: 'ClearOnShutdown.cpp', michael@0: 'CycleCollectedJSRuntime.cpp', michael@0: 'Debug.cpp', michael@0: 'nsConsoleMessage.cpp', michael@0: 'nsConsoleService.cpp', michael@0: 'nsCycleCollector.cpp', michael@0: 'nsDumpUtils.cpp', michael@0: 'nsErrorService.cpp', michael@0: 'nsGZFileWriter.cpp', michael@0: 'nsInterfaceRequestorAgg.cpp', michael@0: 'nsMemoryImpl.cpp', michael@0: 'nsMemoryInfoDumper.cpp', michael@0: 'nsMemoryReporterManager.cpp', michael@0: 'nsMessageLoop.cpp', michael@0: 'nsSecurityConsoleMessage.cpp', michael@0: 'nsStatusReporterManager.cpp', michael@0: 'nsSystemInfo.cpp', michael@0: 'nsTraceRefcnt.cpp', michael@0: 'nsUUIDGenerator.cpp', michael@0: 'nsVersionComparatorImpl.cpp', michael@0: 'VisualEventTracer.cpp', michael@0: ] michael@0: michael@0: # On Windows, NS_StackWalk will only work correctly if we have frame pointers available. michael@0: # That will only be true for non-optimized builds, and for optimized builds with michael@0: # --enable-profiling in the .mozconfig (which is turned on in Nightly by default.) michael@0: # We exclude this file from other build configurations so that if somebody adds a michael@0: # new usage of NS_StackWalk it will cause a link error, which is better than having michael@0: # NS_StackWalk silently return garbage at runtime. michael@0: if CONFIG['OS_TARGET'] != 'WINNT' or \ michael@0: (not CONFIG['MOZ_OPTIMIZE'] or CONFIG['MOZ_PROFILING'] or CONFIG['MOZ_DEBUG']): michael@0: UNIFIED_SOURCES += [ michael@0: 'nsStackWalk.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'Linux': michael@0: SOURCES += [ michael@0: 'SystemMemoryReporter.cpp', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': michael@0: SOURCES += [ michael@0: 'nsMacUtilsImpl.cpp', michael@0: ] michael@0: elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': michael@0: SOURCES += [ michael@0: 'nsCrashOnException.cpp', michael@0: ] michael@0: michael@0: UNIFIED_SOURCES += [ michael@0: 'nsErrorAssertsC.c', michael@0: ] michael@0: michael@0: MSVC_ENABLE_PGO = True michael@0: michael@0: include('/ipc/chromium/chromium-config.mozbuild') michael@0: michael@0: FINAL_LIBRARY = 'xpcom_core' michael@0: michael@0: LOCAL_INCLUDES += [ michael@0: '../build', michael@0: '/xpcom/ds', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_OPTIMIZE']: michael@0: DEFINES['MOZ_OPTIMIZE'] = True michael@0: michael@0: if CONFIG['GNU_CC'] and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': michael@0: # Work around bug 986928 michael@0: CXXFLAGS += ['-Wno-error=format']