xpcom/base/moz.build
author Andrew McCreight <continuation@gmail.com>
Tue, 10 Mar 2015 16:41:38 -0700
changeset 232893 a91f48050ad1695120259feeac6287c95dec5b48
parent 232891 ba1cb75846f36bc22243d3d3b1f595fb880bf429
child 232894 6efde76492aec4498d8c913641ccfd13f4024f7d
permissions -rw-r--r--
Bug 1119482, part 2 - Move HoldDropJSObjects.h from xpcom/glue to xpcom/base. r=froydnj This will clear the way for a HoldDropJSObjects.cpp, as xpcom/glue seems to use weird linking rules.

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

XPIDL_SOURCES += [
    'nsIConsoleListener.idl',
    'nsIConsoleMessage.idl',
    'nsIConsoleService.idl',
    'nsICycleCollectorListener.idl',
    'nsIDebug.idl',
    'nsIDebug2.idl',
    'nsIErrorService.idl',
    'nsIException.idl',
    'nsIGZFileWriter.idl',
    'nsIInterfaceRequestor.idl',
    'nsIMemory.idl',
    'nsIMemoryInfoDumper.idl',
    'nsIMemoryReporter.idl',
    'nsIMessageLoop.idl',
    'nsIMutable.idl',
    'nsIProgrammingLanguage.idl',
    'nsISecurityConsoleMessage.idl',
    'nsIStatusReporter.idl',
    'nsISupports.idl',
    'nsIUUIDGenerator.idl',
    'nsIVersionComparator.idl',
    'nsIVisualEventTracer.idl',
    'nsIWeakReference.idl',
    'nsrootidl.idl',
]

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    XPIDL_SOURCES += [
        'nsIMacUtils.idl',
    ]

XPIDL_MODULE = 'xpcom_base'

EXPORTS += [
    'CodeAddressService.h',
    'ErrorList.h',
    'nsAgg.h',
    'nsAlgorithm.h',
    'nsAutoPtr.h',
    'nsAutoRef.h',
    'nsCom.h',
    'nscore.h',
    'nsCycleCollector.h',
    'nsDebugImpl.h',
    'nsError.h',
    'nsGZFileWriter.h',
    'nsIID.h',
    'nsInterfaceRequestorAgg.h',
    'nsISizeOf.h',
    'nsISupportsBase.h',
    'nsObjCExceptions.h',
    'nsRefPtr.h',
    'nsStackWalk.h',
    'nsTraceRefcnt.h',
    'nsWeakPtr.h',
]

if CONFIG['OS_ARCH'] == 'WINNT':
    EXPORTS += [
        'nsWindowsHelpers.h',
    ]
    if CONFIG['MOZ_DEBUG']:
        EXPORTS += ['pure.h']
        SOURCES += ['pure_api.c']

EXPORTS.mozilla += [
    'AvailableMemoryTracker.h',
    'ClearOnShutdown.h',
    'CountingAllocatorBase.h',
    'CycleCollectedJSRuntime.h',
    'Debug.h',
    'ErrorNames.h',
    'HoldDropJSObjects.h',
    'LinuxUtils.h',
    'nsMemoryInfoDumper.h',
    'StackWalk.h',
    'StaticMutex.h',
    'StaticPtr.h',
    'SystemMemoryReporter.h',
    'VisualEventTracer.h',
]

# nsDebugImpl isn't unified because we disable PGO so that NS_ABORT_OOM isn't
# optimized away oddly.
SOURCES += [
    'nsDebugImpl.cpp',
]
SOURCES['nsDebugImpl.cpp'].no_pgo = True

UNIFIED_SOURCES += [
    'AvailableMemoryTracker.cpp',
    'ClearOnShutdown.cpp',
    'CycleCollectedJSRuntime.cpp',
    'Debug.cpp',
    'ErrorNames.cpp',
    'nsConsoleMessage.cpp',
    'nsConsoleService.cpp',
    'nsCycleCollector.cpp',
    'nsDumpUtils.cpp',
    'nsErrorService.cpp',
    'nsGZFileWriter.cpp',
    'nsInterfaceRequestorAgg.cpp',
    'nsMemoryImpl.cpp',
    'nsMemoryInfoDumper.cpp',
    'nsMemoryReporterManager.cpp',
    'nsMessageLoop.cpp',
    'nsSecurityConsoleMessage.cpp',
    'nsStatusReporterManager.cpp',
    'nsSystemInfo.cpp',
    'nsTraceRefcnt.cpp',
    'nsUUIDGenerator.cpp',
    'nsVersionComparatorImpl.cpp',
    'VisualEventTracer.cpp',
]

# MOZ_STACKWALKING is defined in configure.in when the build configuration meets
# the conditions for NS_StackWalk to work correctly.
# We exclude this file from other build configurations so that if somebody adds a
# new usage of NS_StackWalk it will cause a link error, which is better than having
# NS_StackWalk silently return garbage at runtime.
if CONFIG['MOZ_STACKWALKING']:
    SOURCES += [
        'nsStackWalk.cpp',
    ]

if CONFIG['OS_ARCH'] == 'Linux':
    SOURCES += [
        'LinuxUtils.cpp',
        'SystemMemoryReporter.cpp',
    ]

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    SOURCES += [
        'nsMacUtilsImpl.cpp',
    ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    SOURCES += [
        'nsCrashOnException.cpp',
    ]

MSVC_ENABLE_PGO = True

include('/ipc/chromium/chromium-config.mozbuild')

FINAL_LIBRARY = 'xul'

LOCAL_INCLUDES += [
    '../build',
    '/xpcom/ds',
]

if CONFIG['MOZ_WIDGET_GTK']:
    CXXFLAGS += CONFIG['TK_CFLAGS']

FAIL_ON_WARNINGS = True