2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; 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-03-19 22:47:00 +04:00
|
|
|
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2015-09-02 05:04:42 +03:00
|
|
|
'../../build/jemalloc_config.cpp',
|
2013-10-05 14:19:08 +04:00
|
|
|
'../../build/mozjemalloc_compat.c',
|
2013-06-04 19:08:44 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
# Android doesn't have pthread_atfork, so just implement a dummy function.
|
|
|
|
# It shouldn't make much problem, as the use of fork is pretty limited on
|
|
|
|
# Android.
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-06-04 19:08:44 +04:00
|
|
|
'pthread_atfork.c',
|
|
|
|
]
|
2013-06-17 23:21:01 +04:00
|
|
|
|
2014-09-04 04:04:45 +04:00
|
|
|
SharedLibrary('replace_jemalloc')
|
2013-06-17 23:21:01 +04:00
|
|
|
|
2014-07-23 08:30:52 +04:00
|
|
|
USE_LIBS += [
|
|
|
|
'jemalloc',
|
|
|
|
]
|
|
|
|
|
2015-09-04 08:45:53 +03:00
|
|
|
DEFINES['MOZ_JEMALLOC4'] = True
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES['MOZ_REPLACE_JEMALLOC'] = True
|
2014-02-18 10:05:51 +04:00
|
|
|
|
2015-11-04 08:20:20 +03:00
|
|
|
LOCAL_INCLUDES += ['!../../jemalloc/src/include']
|
2014-02-18 10:05:51 +04:00
|
|
|
if CONFIG['_MSC_VER']:
|
|
|
|
LOCAL_INCLUDES += ['/memory/jemalloc/src/include/msvc_compat']
|
2014-12-23 07:37:43 +03:00
|
|
|
if not CONFIG['HAVE_INTTYPES_H']:
|
|
|
|
LOCAL_INCLUDES += ['/memory/jemalloc/src/include/msvc_compat/C99']
|
2014-03-05 04:39:06 +04:00
|
|
|
|
|
|
|
DISABLE_STL_WRAPPING = True
|