bug 451193. link xulrunner-stub with jemalloc on linux. r=bsmedberg
--- a/memory/jemalloc/Makefile.in
+++ b/memory/jemalloc/Makefile.in
@@ -94,17 +94,22 @@ ifndef GNU_CC
MODULE_OPTIMIZE_FLAGS = -xO5
endif
endif
LIBRARY_NAME = jemalloc
# Build jemalloc as a shared lib. This is mandatory for Darwin, since a library
# init function is used on that platform.
+ifeq ($(OS_ARCH),Darwin)
FORCE_SHARED_LIB= 1
+else
+DIST_INSTALL = 1
+FORCE_STATIC_LIB= 1
+endif
CSRCS = \
jemalloc.c \
$(NULL)
#XXX: PGO on Linux causes problems here
# See bug 419470
NO_PROFILE_GUIDED_OPTIMIZE = 1
--- a/xulrunner/app/Makefile.in
+++ b/xulrunner/app/Makefile.in
@@ -169,16 +169,22 @@ ifeq ($(OS_ARCH),OS2)
RESFILE=splashos2.res
RCFLAGS += -DMOZ_XULRUNNER
ifdef DEBUG
RCFLAGS += -DDEBUG
endif
RCFLAGS += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
endif
+ifdef MOZ_MEMORY
+ifneq ($(OS_ARCH),WINNT)
+LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
+endif
+endif
+
include $(topsrcdir)/config/rules.mk
DEFINES += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
LIBS += -lphexlib
endif
--- a/xulrunner/stub/Makefile.in
+++ b/xulrunner/stub/Makefile.in
@@ -92,13 +92,19 @@ endif
endif
include $(topsrcdir)/config/config.mk
ifdef _MSC_VER
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
endif
+ifdef MOZ_MEMORY
+ifneq ($(OS_ARCH),WINNT)
+LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
+endif
+endif
+
include $(topsrcdir)/config/rules.mk
ifeq ($(OS_ARCH),WINNT)
OS_LIBS += $(call EXPAND_LIBNAME,shell32)
endif