bug 451193. link xulrunner-stub with jemalloc on linux. r=bsmedberg
authorStuart Parmenter <pavlov@pavlov.net>
Tue, 26 Aug 2008 15:25:05 -0700
changeset 18429 12616044efd376d65d505b25c096c86007a9a13c
parent 18428 43e89bd626d27eb3574f5a3af9239b2fc24e7c97
child 18430 3e41c4b388c303aa105fef878c1466628f4683aa
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs451193
milestone1.9.1a2pre
bug 451193. link xulrunner-stub with jemalloc on linux. r=bsmedberg
memory/jemalloc/Makefile.in
xulrunner/app/Makefile.in
xulrunner/stub/Makefile.in
--- 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