2016-07-14 16:16:42 +00:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 20:47:17 +00:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2015-03-25 01:17:08 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-10-05 10:18:36 +00:00
|
|
|
'src/src/arena.c',
|
|
|
|
'src/src/atomic.c',
|
|
|
|
'src/src/base.c',
|
|
|
|
'src/src/bitmap.c',
|
|
|
|
'src/src/chunk.c',
|
|
|
|
'src/src/chunk_dss.c',
|
|
|
|
'src/src/chunk_mmap.c',
|
|
|
|
'src/src/ckh.c',
|
|
|
|
'src/src/extent.c',
|
|
|
|
'src/src/hash.c',
|
|
|
|
'src/src/huge.c',
|
|
|
|
'src/src/jemalloc.c',
|
|
|
|
'src/src/mb.c',
|
|
|
|
'src/src/mutex.c',
|
2016-02-22 14:20:15 +00:00
|
|
|
'src/src/nstime.c',
|
2015-08-12 06:21:38 +00:00
|
|
|
'src/src/pages.c',
|
2016-02-22 14:20:15 +00:00
|
|
|
'src/src/prng.c',
|
2013-10-05 10:18:36 +00:00
|
|
|
'src/src/prof.c',
|
|
|
|
'src/src/quarantine.c',
|
|
|
|
'src/src/rtree.c',
|
2016-07-12 14:37:04 +00:00
|
|
|
'src/src/spin.c',
|
2013-10-05 10:18:36 +00:00
|
|
|
'src/src/stats.c',
|
|
|
|
'src/src/tcache.c',
|
2016-02-22 14:20:15 +00:00
|
|
|
'src/src/ticker.c',
|
2013-10-05 10:18:36 +00:00
|
|
|
'src/src/tsd.c',
|
|
|
|
'src/src/util.c',
|
2016-07-12 14:37:04 +00:00
|
|
|
'src/src/witness.c',
|
2013-06-04 15:08:44 +00:00
|
|
|
]
|
|
|
|
|
2015-03-25 01:17:08 +00:00
|
|
|
SOURCES += [
|
|
|
|
# This file cannot be built in unified mode because of symbol clash on arena_purge.
|
|
|
|
'src/src/ctl.c',
|
|
|
|
]
|
|
|
|
|
2013-06-04 15:08:44 +00:00
|
|
|
# Only OSX needs the zone allocation implementation,
|
|
|
|
# but only if replace-malloc is not enabled.
|
|
|
|
if CONFIG['OS_TARGET'] == 'Darwin' and not CONFIG['MOZ_REPLACE_MALLOC']:
|
2015-03-25 01:17:08 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-10-05 10:18:36 +00:00
|
|
|
'src/src/zone.c',
|
2013-06-04 15:08:44 +00:00
|
|
|
]
|
2013-06-17 19:21:01 +00:00
|
|
|
|
2014-09-03 05:10:54 +00:00
|
|
|
Library('jemalloc')
|
2013-06-17 19:21:01 +00:00
|
|
|
|
2013-10-24 17:51:00 +00:00
|
|
|
FORCE_STATIC_LIB = True
|
2013-11-27 13:55:07 +00:00
|
|
|
|
2014-10-30 04:06:12 +00:00
|
|
|
if CONFIG['MOZ_GLUE_IN_PROGRAM']:
|
2014-07-23 04:29:09 +00:00
|
|
|
SDK_LIBRARY = True
|
2015-05-08 23:37:22 +00:00
|
|
|
DIST_INSTALL = True
|
2014-07-23 04:29:09 +00:00
|
|
|
|
2013-11-27 13:55:07 +00:00
|
|
|
if CONFIG['_MSC_VER']:
|
|
|
|
DEFINES['DLLEXPORT'] = True
|
2014-02-18 06:05:51 +00:00
|
|
|
LOCAL_INCLUDES += ['src/include/msvc_compat']
|
2014-05-31 00:54:23 +00:00
|
|
|
if not CONFIG['HAVE_INTTYPES_H']:
|
|
|
|
LOCAL_INCLUDES += ['src/include/msvc_compat/C99']
|
2013-11-27 13:55:07 +00:00
|
|
|
|
|
|
|
if CONFIG['OS_TARGET'] == 'Linux':
|
|
|
|
# For mremap
|
|
|
|
DEFINES['_GNU_SOURCE'] = True
|
|
|
|
|
2015-08-06 21:22:56 +00:00
|
|
|
if CONFIG['GNU_CC']:
|
|
|
|
CFLAGS += ['-std=gnu99']
|
2014-06-25 02:44:58 +00:00
|
|
|
|
2013-11-27 13:55:07 +00:00
|
|
|
DEFINES['abort'] = 'moz_abort'
|
2016-11-08 08:53:00 +00:00
|
|
|
DEFINES['MOZ_HAS_MOZGLUE'] = True
|
2014-02-18 06:05:51 +00:00
|
|
|
|
2015-11-04 05:20:20 +00:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'!src/include',
|
|
|
|
'src/include',
|
|
|
|
]
|
2015-08-28 03:44:53 +00:00
|
|
|
|
2015-10-20 01:05:20 +00:00
|
|
|
# We allow warnings for third-party code that can be updated from upstream.
|
2015-08-28 03:44:53 +00:00
|
|
|
ALLOW_COMPILER_WARNINGS = True
|
2016-02-22 14:20:15 +00:00
|
|
|
|
|
|
|
OS_LIBS += CONFIG['REALTIME_LIBS']
|