2013-04-01 22:36:59 +04:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:17 +04:00
|
|
|
# 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/.
|
|
|
|
|
2013-11-21 18:46:32 +04:00
|
|
|
SOURCES += [
|
2013-10-05 14:18:36 +04:00
|
|
|
'src/src/arena.c',
|
|
|
|
'src/src/atomic.c',
|
|
|
|
'src/src/base.c',
|
|
|
|
'src/src/bitmap.c',
|
|
|
|
'src/src/chunk.c',
|
|
|
|
'src/src/chunk_dss.c',
|
|
|
|
'src/src/chunk_mmap.c',
|
|
|
|
'src/src/ckh.c',
|
2013-11-21 23:28:52 +04:00
|
|
|
'src/src/ctl.c',
|
2013-10-05 14:18:36 +04:00
|
|
|
'src/src/extent.c',
|
|
|
|
'src/src/hash.c',
|
|
|
|
'src/src/huge.c',
|
|
|
|
'src/src/jemalloc.c',
|
|
|
|
'src/src/mb.c',
|
|
|
|
'src/src/mutex.c',
|
|
|
|
'src/src/prof.c',
|
|
|
|
'src/src/quarantine.c',
|
|
|
|
'src/src/rtree.c',
|
|
|
|
'src/src/stats.c',
|
|
|
|
'src/src/tcache.c',
|
|
|
|
'src/src/tsd.c',
|
|
|
|
'src/src/util.c',
|
2013-06-04 19:08:44 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
# Only OSX needs the zone allocation implementation,
|
|
|
|
# but only if replace-malloc is not enabled.
|
|
|
|
if CONFIG['OS_TARGET'] == 'Darwin' and not CONFIG['MOZ_REPLACE_MALLOC']:
|
2013-11-21 23:28:52 +04:00
|
|
|
SOURCES += [
|
2013-10-05 14:18:36 +04:00
|
|
|
'src/src/zone.c',
|
2013-06-04 19:08:44 +04:00
|
|
|
]
|
2013-06-17 23:21:01 +04:00
|
|
|
|
|
|
|
LIBRARY_NAME = 'jemalloc'
|
|
|
|
|
2013-10-24 21:51:00 +04:00
|
|
|
FORCE_STATIC_LIB = True
|
2013-11-27 17:55:07 +04:00
|
|
|
|
|
|
|
if CONFIG['_MSC_VER']:
|
|
|
|
DEFINES['DLLEXPORT'] = True
|
2014-02-18 10:05:51 +04:00
|
|
|
LOCAL_INCLUDES += ['src/include/msvc_compat']
|
2014-05-31 04:54:23 +04:00
|
|
|
if not CONFIG['HAVE_INTTYPES_H']:
|
|
|
|
LOCAL_INCLUDES += ['src/include/msvc_compat/C99']
|
2013-11-27 17:55:07 +04:00
|
|
|
|
|
|
|
if CONFIG['OS_TARGET'] == 'Linux':
|
|
|
|
# For mremap
|
|
|
|
DEFINES['_GNU_SOURCE'] = True
|
|
|
|
|
2014-06-25 06:44:58 +04:00
|
|
|
if CONFIG['MOZ_NUWA_PROCESS'] and CONFIG['MOZ_JEMALLOC3']:
|
|
|
|
DEFINES['pthread_mutex_lock'] = '__real_pthread_mutex_lock';
|
|
|
|
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES['abort'] = 'moz_abort'
|
2014-02-18 10:05:51 +04:00
|
|
|
|
|
|
|
GENERATED_INCLUDES += ['src/include']
|
|
|
|
LOCAL_INCLUDES += ['src/include']
|