2008-02-06 15:06:50 -08:00
|
|
|
#
|
2012-05-29 08:52:43 -07:00
|
|
|
# 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/.
|
2008-02-06 15:06:50 -08:00
|
|
|
|
|
|
|
DEPTH = ../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
MODULE = jemalloc
|
|
|
|
|
2012-06-07 01:41:59 -07:00
|
|
|
EXPORTS = jemalloc.h jemalloc_types.h
|
|
|
|
|
|
|
|
ifndef MOZ_JEMALLOC
|
2008-06-20 10:34:42 -07:00
|
|
|
# jemalloc.c properly uses 'static', so don't burden it with manually exposing
|
|
|
|
# symbols.
|
|
|
|
VISIBILITY_FLAGS=
|
|
|
|
|
2011-06-27 12:44:51 -07:00
|
|
|
CSRCS = jemalloc.c
|
2012-06-07 01:41:59 -07:00
|
|
|
|
2011-06-27 12:44:51 -07:00
|
|
|
LIBRARY_NAME = jemalloc
|
2011-09-02 23:19:06 -07:00
|
|
|
FORCE_STATIC_LIB= 1
|
2008-02-06 15:06:50 -08:00
|
|
|
|
2008-04-30 00:14:44 -07:00
|
|
|
ifeq ($(OS_ARCH),SunOS)
|
|
|
|
ifndef GNU_CC
|
|
|
|
MODULE_OPTIMIZE_FLAGS = -xO5
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2011-09-02 23:19:06 -07:00
|
|
|
ifeq (Linux,$(OS_TARGET))
|
2008-02-25 12:25:25 -08:00
|
|
|
#XXX: PGO on Linux causes problems here
|
|
|
|
# See bug 419470
|
|
|
|
NO_PROFILE_GUIDED_OPTIMIZE = 1
|
2008-02-06 15:06:50 -08:00
|
|
|
endif
|
2012-06-07 01:41:59 -07:00
|
|
|
endif
|
2008-02-06 15:06:50 -08:00
|
|
|
|
2012-06-19 22:22:40 -07:00
|
|
|
# For non release/esr builds, enable (some) fatal jemalloc assertions. This
|
|
|
|
# helps us catch memory errors. See bug 764192 for details on what
|
|
|
|
# MOZ_TEMP_INVESTIGATION is for.
|
2012-06-13 06:10:12 -07:00
|
|
|
ifeq (,$(filter release esr,$(MOZ_UPDATE_CHANNEL)))
|
2012-06-19 22:22:40 -07:00
|
|
|
DEFINES += -DMOZ_JEMALLOC_HARD_ASSERTS -DMOZ_TEMP_INVESTIGATION
|
2012-06-13 06:10:12 -07:00
|
|
|
endif
|
|
|
|
|
2008-02-06 15:06:50 -08:00
|
|
|
include $(topsrcdir)/config/rules.mk
|