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/.
12 DEFINES['MOZ_MEMORY_IMPL'] = True
14 if CONFIG['MOZ_REPLACE_MALLOC']:
19 DEFINES['MOZ_REPLACE_MALLOC'] = True
26 if CONFIG['MOZ_JEMALLOC3']:
28 'mozjemalloc_compat.c',
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']:
39 LIBRARY_NAME = 'memory'
41 if CONFIG['MOZ_JEMALLOC3']:
42 if not CONFIG['MOZ_NATIVE_JEMALLOC']:
51 if CONFIG['MOZ_GLUE_PROGRAM_LDFLAGS']:
54 # Keep jemalloc separated when mozglue is statically linked
55 if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or
56 CONFIG['MOZ_NATIVE_JEMALLOC']):
57 FINAL_LIBRARY = 'mozglue'
59 if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin':
60 # The zone allocator for OSX needs some jemalloc internal functions
61 LOCAL_INCLUDES += ['/memory/jemalloc/src/include']
63 FAIL_ON_WARNINGS = True