xpcom/base/moz.build

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/base/moz.build	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,162 @@
     1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
     1.5 +# vim: set filetype=python:
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +XPIDL_SOURCES += [
    1.11 +    'nsIConsoleListener.idl',
    1.12 +    'nsIConsoleMessage.idl',
    1.13 +    'nsIConsoleService.idl',
    1.14 +    'nsICycleCollectorListener.idl',
    1.15 +    'nsIDebug.idl',
    1.16 +    'nsIDebug2.idl',
    1.17 +    'nsIErrorService.idl',
    1.18 +    'nsIException.idl',
    1.19 +    'nsIGZFileWriter.idl',
    1.20 +    'nsIInterfaceRequestor.idl',
    1.21 +    'nsIMemory.idl',
    1.22 +    'nsIMemoryInfoDumper.idl',
    1.23 +    'nsIMemoryReporter.idl',
    1.24 +    'nsIMessageLoop.idl',
    1.25 +    'nsIMutable.idl',
    1.26 +    'nsIProgrammingLanguage.idl',
    1.27 +    'nsISecurityConsoleMessage.idl',
    1.28 +    'nsIStatusReporter.idl',
    1.29 +    'nsISupports.idl',
    1.30 +    'nsIUUIDGenerator.idl',
    1.31 +    'nsIVersionComparator.idl',
    1.32 +    'nsIVisualEventTracer.idl',
    1.33 +    'nsIWeakReference.idl',
    1.34 +    'nsrootidl.idl',
    1.35 +]
    1.36 +
    1.37 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    1.38 +    XPIDL_SOURCES += [
    1.39 +        'nsIMacUtils.idl',
    1.40 +    ]
    1.41 +
    1.42 +XPIDL_MODULE = 'xpcom_base'
    1.43 +
    1.44 +EXPORTS += [
    1.45 +    'ErrorList.h',
    1.46 +    'nsAgg.h',
    1.47 +    'nsAutoPtr.h',
    1.48 +    'nsAutoRef.h',
    1.49 +    'nsCom.h',
    1.50 +    'nscore.h',
    1.51 +    'nsCycleCollector.h',
    1.52 +    'nsDebugImpl.h',
    1.53 +    'nsError.h',
    1.54 +    'nsGZFileWriter.h',
    1.55 +    'nsIID.h',
    1.56 +    'nsInterfaceRequestorAgg.h',
    1.57 +    'nsISizeOf.h',
    1.58 +    'nsISupportsBase.h',
    1.59 +    'nsISupportsObsolete.h',
    1.60 +    'nsObjCExceptions.h',
    1.61 +    'nsStackWalk.h',
    1.62 +    'nsTraceRefcnt.h',
    1.63 +    'nsWeakPtr.h',
    1.64 +]
    1.65 +
    1.66 +if CONFIG['OS_ARCH'] == 'WINNT':
    1.67 +    EXPORTS += [
    1.68 +        'nsWindowsHelpers.h',
    1.69 +    ]
    1.70 +    if CONFIG['MOZ_DEBUG']:
    1.71 +        EXPORTS += ['pure.h']
    1.72 +        SOURCES += ['pure_api.c']
    1.73 +
    1.74 +EXPORTS.mozilla += [
    1.75 +    'AvailableMemoryTracker.h',
    1.76 +    'ClearOnShutdown.h',
    1.77 +    'CycleCollectedJSRuntime.h',
    1.78 +    'Debug.h',
    1.79 +    'nsMemoryInfoDumper.h',
    1.80 +    'StackWalk.h',
    1.81 +    'StaticMutex.h',
    1.82 +    'StaticPtr.h',
    1.83 +    'SystemMemoryReporter.h',
    1.84 +    'VisualEventTracer.h',
    1.85 +]
    1.86 +
    1.87 +# nsDebugImpl isn't unified because we disable PGO so that NS_ABORT_OOM isn't
    1.88 +# optimized away oddly.
    1.89 +SOURCES += [
    1.90 +    'nsDebugImpl.cpp',
    1.91 +]
    1.92 +SOURCES['nsDebugImpl.cpp'].no_pgo = True
    1.93 +
    1.94 +UNIFIED_SOURCES += [
    1.95 +    'AvailableMemoryTracker.cpp',
    1.96 +    'ClearOnShutdown.cpp',
    1.97 +    'CycleCollectedJSRuntime.cpp',
    1.98 +    'Debug.cpp',
    1.99 +    'nsConsoleMessage.cpp',
   1.100 +    'nsConsoleService.cpp',
   1.101 +    'nsCycleCollector.cpp',
   1.102 +    'nsDumpUtils.cpp',
   1.103 +    'nsErrorService.cpp',
   1.104 +    'nsGZFileWriter.cpp',
   1.105 +    'nsInterfaceRequestorAgg.cpp',
   1.106 +    'nsMemoryImpl.cpp',
   1.107 +    'nsMemoryInfoDumper.cpp',
   1.108 +    'nsMemoryReporterManager.cpp',
   1.109 +    'nsMessageLoop.cpp',
   1.110 +    'nsSecurityConsoleMessage.cpp',
   1.111 +    'nsStatusReporterManager.cpp',
   1.112 +    'nsSystemInfo.cpp',
   1.113 +    'nsTraceRefcnt.cpp',
   1.114 +    'nsUUIDGenerator.cpp',
   1.115 +    'nsVersionComparatorImpl.cpp',
   1.116 +    'VisualEventTracer.cpp',
   1.117 +]
   1.118 +
   1.119 +# On Windows, NS_StackWalk will only work correctly if we have frame pointers available.
   1.120 +# That will only be true for non-optimized builds, and for optimized builds with
   1.121 +# --enable-profiling in the .mozconfig (which is turned on in Nightly by default.)
   1.122 +# We exclude this file from other build configurations so that if somebody adds a
   1.123 +# new usage of NS_StackWalk it will cause a link error, which is better than having
   1.124 +# NS_StackWalk silently return garbage at runtime.
   1.125 +if CONFIG['OS_TARGET'] != 'WINNT' or \
   1.126 +   (not CONFIG['MOZ_OPTIMIZE'] or CONFIG['MOZ_PROFILING'] or CONFIG['MOZ_DEBUG']):
   1.127 +    UNIFIED_SOURCES += [
   1.128 +        'nsStackWalk.cpp',
   1.129 +    ]
   1.130 +
   1.131 +if CONFIG['OS_ARCH'] == 'Linux':
   1.132 +    SOURCES += [
   1.133 +        'SystemMemoryReporter.cpp',
   1.134 +    ]
   1.135 +
   1.136 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
   1.137 +    SOURCES += [
   1.138 +        'nsMacUtilsImpl.cpp',
   1.139 +    ]
   1.140 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
   1.141 +    SOURCES += [
   1.142 +        'nsCrashOnException.cpp',
   1.143 +    ]
   1.144 +
   1.145 +UNIFIED_SOURCES += [
   1.146 +    'nsErrorAssertsC.c',
   1.147 +]
   1.148 +
   1.149 +MSVC_ENABLE_PGO = True
   1.150 +
   1.151 +include('/ipc/chromium/chromium-config.mozbuild')
   1.152 +
   1.153 +FINAL_LIBRARY = 'xpcom_core'
   1.154 +
   1.155 +LOCAL_INCLUDES += [
   1.156 +    '../build',
   1.157 +    '/xpcom/ds',
   1.158 +]
   1.159 +
   1.160 +if CONFIG['MOZ_OPTIMIZE']:
   1.161 +    DEFINES['MOZ_OPTIMIZE'] = True
   1.162 +
   1.163 +if CONFIG['GNU_CC'] and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
   1.164 +    # Work around bug 986928
   1.165 +    CXXFLAGS += ['-Wno-error=format']

mercurial