memory/mozjemalloc/moz.build
author Olli Pettay <Olli.Pettay@helsinki.fi>
Tue, 03 Jan 2017 21:47:55 +0200
changeset 372876 910c551b4d72866775aa6ff9a4dd024b266a06c9
parent 364980 13ed22321146fa7779394fc20ddee89de631b5d1
child 390812 972714aa03b210476c57991c58e30ea9f98745e2
permissions -rw-r--r--
Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8

# -*- Mode: python; 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/.

EXPORTS += [
    'jemalloc_types.h',
]

if not CONFIG['MOZ_JEMALLOC4']:
    SOURCES += [
        'jemalloc.c',
    ]
    FINAL_LIBRARY = 'memory'

    # See bug 422055.
    if CONFIG['OS_ARCH'] == 'SunOS' and not CONFIG['GNU_CC'] \
            and CONFIG['MOZ_OPTIMIZE']:
        CFLAGS += ['-xO5']

# For non release/esr builds, enable (some) fatal jemalloc assertions.  This
# helps us catch memory errors.
if CONFIG['MOZ_UPDATE_CHANNEL'] not in ('release', 'esr'):
    DEFINES['MOZ_JEMALLOC_HARD_ASSERTS'] = True

DEFINES['abort'] = 'moz_abort'

DEFINES['MOZ_JEMALLOC_IMPL'] = True

#XXX: PGO on Linux causes problems here
# See bug 419470
if CONFIG['OS_TARGET'] == 'Linux':
    NO_PGO = True

LOCAL_INCLUDES += [
    '/memory/build',
]

if CONFIG['GNU_CC']:
    CFLAGS += ['-Wno-unused'] # too many annoying warnings from mfbt/ headers

if CONFIG['_MSC_VER']:
    CFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163)