1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/memory/build/moz.build Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- 1.5 +# vim: set filetype=python: 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +EXPORTS += [ 1.11 + 'mozmemory.h', 1.12 + 'mozmemory_wrap.h', 1.13 +] 1.14 + 1.15 +DEFINES['MOZ_MEMORY_IMPL'] = True 1.16 + 1.17 +if CONFIG['MOZ_REPLACE_MALLOC']: 1.18 + EXPORTS += [ 1.19 + 'malloc_decls.h', 1.20 + 'replace_malloc.h', 1.21 + ] 1.22 + DEFINES['MOZ_REPLACE_MALLOC'] = True 1.23 + 1.24 +SOURCES += [ 1.25 + 'jemalloc_config.c', 1.26 + 'mozmemory_wrap.c', 1.27 +] 1.28 + 1.29 +if CONFIG['MOZ_JEMALLOC3']: 1.30 + SOURCES += [ 1.31 + 'mozjemalloc_compat.c', 1.32 + ] 1.33 + GENERATED_INCLUDES += ['../jemalloc/src/include'] 1.34 + if CONFIG['_MSC_VER']: 1.35 + LOCAL_INCLUDES += ['/memory/jemalloc/src/include/msvc_compat'] 1.36 + 1.37 +if CONFIG['MOZ_REPLACE_MALLOC']: 1.38 + SOURCES += [ 1.39 + 'replace_malloc.c', 1.40 + ] 1.41 + 1.42 +LIBRARY_NAME = 'memory' 1.43 + 1.44 +# Keep jemalloc separated when mozglue is statically linked 1.45 +if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or 1.46 + CONFIG['MOZ_NATIVE_JEMALLOC']): 1.47 + FINAL_LIBRARY = 'mozglue' 1.48 + 1.49 +if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin': 1.50 + # The zone allocator for OSX needs some jemalloc internal functions 1.51 + LOCAL_INCLUDES += ['/memory/jemalloc/src/include']