|
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/. |
|
6 |
|
7 SOURCES += [ |
|
8 'src/src/arena.c', |
|
9 'src/src/atomic.c', |
|
10 'src/src/base.c', |
|
11 'src/src/bitmap.c', |
|
12 'src/src/chunk.c', |
|
13 'src/src/chunk_dss.c', |
|
14 'src/src/chunk_mmap.c', |
|
15 'src/src/ckh.c', |
|
16 'src/src/ctl.c', |
|
17 'src/src/extent.c', |
|
18 'src/src/hash.c', |
|
19 'src/src/huge.c', |
|
20 'src/src/jemalloc.c', |
|
21 'src/src/mb.c', |
|
22 'src/src/mutex.c', |
|
23 'src/src/prof.c', |
|
24 'src/src/quarantine.c', |
|
25 'src/src/rtree.c', |
|
26 'src/src/stats.c', |
|
27 'src/src/tcache.c', |
|
28 'src/src/tsd.c', |
|
29 'src/src/util.c', |
|
30 ] |
|
31 |
|
32 # Only OSX needs the zone allocation implementation, |
|
33 # but only if replace-malloc is not enabled. |
|
34 if CONFIG['OS_TARGET'] == 'Darwin' and not CONFIG['MOZ_REPLACE_MALLOC']: |
|
35 SOURCES += [ |
|
36 'src/src/zone.c', |
|
37 ] |
|
38 |
|
39 LIBRARY_NAME = 'jemalloc' |
|
40 |
|
41 FORCE_STATIC_LIB = True |
|
42 |
|
43 if CONFIG['_MSC_VER']: |
|
44 DEFINES['DLLEXPORT'] = True |
|
45 LOCAL_INCLUDES += ['src/include/msvc_compat'] |
|
46 |
|
47 if CONFIG['OS_TARGET'] == 'Linux': |
|
48 # For mremap |
|
49 DEFINES['_GNU_SOURCE'] = True |
|
50 |
|
51 DEFINES['abort'] = 'moz_abort' |
|
52 |
|
53 GENERATED_INCLUDES += ['src/include'] |
|
54 LOCAL_INCLUDES += ['src/include'] |