Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 EXPORTS += [
8 'mozmemory.h',
9 'mozmemory_wrap.h',
10 ]
12 DEFINES['MOZ_MEMORY_IMPL'] = True
14 if CONFIG['MOZ_REPLACE_MALLOC']:
15 EXPORTS += [
16 'malloc_decls.h',
17 'replace_malloc.h',
18 ]
19 DEFINES['MOZ_REPLACE_MALLOC'] = True
21 SOURCES += [
22 'jemalloc_config.c',
23 'mozmemory_wrap.c',
24 ]
26 if CONFIG['MOZ_JEMALLOC3']:
27 SOURCES += [
28 'mozjemalloc_compat.c',
29 ]
30 GENERATED_INCLUDES += ['../jemalloc/src/include']
31 if CONFIG['_MSC_VER']:
32 LOCAL_INCLUDES += ['/memory/jemalloc/src/include/msvc_compat']
34 if CONFIG['MOZ_REPLACE_MALLOC']:
35 SOURCES += [
36 'replace_malloc.c',
37 ]
39 LIBRARY_NAME = 'memory'
41 # Keep jemalloc separated when mozglue is statically linked
42 if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or
43 CONFIG['MOZ_NATIVE_JEMALLOC']):
44 FINAL_LIBRARY = 'mozglue'
46 if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin':
47 # The zone allocator for OSX needs some jemalloc internal functions
48 LOCAL_INCLUDES += ['/memory/jemalloc/src/include']