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-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
|
|
|
'mozmemory.h',
|
|
|
|
'mozmemory_wrap.h',
|
|
|
|
]
|
|
|
|
|
2016-11-10 14:57:00 +03:00
|
|
|
LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES['MOZ_MEMORY_IMPL'] = True
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
if CONFIG['MOZ_REPLACE_MALLOC']:
|
|
|
|
EXPORTS += [
|
|
|
|
'malloc_decls.h',
|
2013-05-17 05:07:12 +04:00
|
|
|
'replace_malloc.h',
|
2014-11-18 13:21:06 +03:00
|
|
|
'replace_malloc_bridge.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
2013-11-27 17:55:07 +04:00
|
|
|
|
2013-11-21 23:28:52 +04:00
|
|
|
SOURCES += [
|
2015-09-02 05:04:42 +03:00
|
|
|
'jemalloc_config.cpp',
|
2013-06-04 19:08:44 +04:00
|
|
|
'mozmemory_wrap.c',
|
|
|
|
]
|
|
|
|
|
2015-09-04 08:45:53 +03:00
|
|
|
if CONFIG['MOZ_JEMALLOC4']:
|
2013-11-21 23:28:52 +04:00
|
|
|
SOURCES += [
|
2013-06-04 19:08:44 +04:00
|
|
|
'mozjemalloc_compat.c',
|
|
|
|
]
|
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']
|
2013-06-04 19:08:44 +04:00
|
|
|
|
|
|
|
if CONFIG['MOZ_REPLACE_MALLOC']:
|
2013-11-21 23:28:52 +04:00
|
|
|
SOURCES += [
|
2013-06-04 19:08:44 +04:00
|
|
|
'replace_malloc.c',
|
|
|
|
]
|
2013-06-17 23:21:01 +04:00
|
|
|
|
2017-01-18 05:45:45 +03:00
|
|
|
if CONFIG['OS_TARGET'] == 'Darwin' and (CONFIG['MOZ_REPLACE_MALLOC'] or
|
|
|
|
CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_JEMALLOC4']):
|
|
|
|
SOURCES += [
|
|
|
|
'zone.c',
|
|
|
|
]
|
2017-01-18 05:39:29 +03:00
|
|
|
|
2014-09-03 09:10:54 +04:00
|
|
|
Library('memory')
|
2013-06-17 23:21:01 +04:00
|
|
|
|
2014-10-30 07:06:12 +03:00
|
|
|
if CONFIG['MOZ_GLUE_IN_PROGRAM']:
|
2015-05-09 02:37:22 +03:00
|
|
|
DIST_INSTALL = True
|
2014-07-23 08:29:09 +04:00
|
|
|
|
2013-11-19 06:47:14 +04:00
|
|
|
# Keep jemalloc separated when mozglue is statically linked
|
|
|
|
if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or
|
2016-02-01 18:49:34 +03:00
|
|
|
CONFIG['MOZ_SYSTEM_JEMALLOC']):
|
2013-11-19 06:47:14 +04:00
|
|
|
FINAL_LIBRARY = 'mozglue'
|
2014-02-18 10:05:51 +04:00
|
|
|
|
|
|
|
if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin':
|
|
|
|
# The zone allocator for OSX needs some jemalloc internal functions
|
|
|
|
LOCAL_INCLUDES += ['/memory/jemalloc/src/include']
|