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