From 221838708e1b11225f6deb1d7567ca2fcc4b8faf Mon Sep 17 00:00:00 2001 From: "gavin@gavinsharp.com" Date: Wed, 28 May 2008 11:42:31 -0700 Subject: [PATCH] Bug 422055: use jemalloc on Solaris, r=ted, a=shaver --- browser/app/Makefile.in | 3 --- config/rules.mk | 6 ++++++ js/src/Makefile.in | 6 ++++++ xpcom/typelib/xpidl/Makefile.in | 5 +++++ xpcom/typelib/xpt/tools/Makefile.in | 5 +++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 49308aad5fdd..33ba1ac9b799 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -76,9 +76,6 @@ ifdef MOZ_MEMORY ifneq ($(OS_ARCH),WINNT) LIBS += -ljemalloc endif -ifeq ($(OS_ARCH),SunOS) -SOLARIS_JEMALLOC_LDFLAGS = -L$(LIBXUL_DIST)/bin -lxul -endif endif ifdef LIBXUL_SDK diff --git a/config/rules.mk b/config/rules.mk index bc10c19d659f..05b5eb252258 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -1226,6 +1226,12 @@ endif # COMPILER_DEPEND endif # MOZ_AUTO_DEPS +ifdef MOZ_MEMORY +ifeq ($(OS_ARCH),SunOS) +SOLARIS_JEMALLOC_LDFLAGS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DIST)/lib) +endif +endif + # Rules for building native targets must come first because of the host_ prefix host_%.$(OBJ_SUFFIX): %.c Makefile Makefile.in $(REPORT_BUILD) diff --git a/js/src/Makefile.in b/js/src/Makefile.in index 9a6b546f5594..8f9230a90347 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -206,6 +206,12 @@ include $(topsrcdir)/config/config.mk EXTRA_DSO_LDOPTS += $(NSPR_LIBS) +ifdef MOZ_MEMORY +ifeq ($(OS_ARCH),SunOS) +EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DIST)/lib) +endif +endif + # When using gcc the assembly is inlined in the C-file (see jslock.c) ifeq ($(OS_ARCH),SunOS) ifneq (86,$(findstring 86,$(OS_TEST))) diff --git a/xpcom/typelib/xpidl/Makefile.in b/xpcom/typelib/xpidl/Makefile.in index f93b256f72be..865fe2bd23dc 100644 --- a/xpcom/typelib/xpidl/Makefile.in +++ b/xpcom/typelib/xpidl/Makefile.in @@ -134,6 +134,11 @@ include $(topsrcdir)/config/rules.mk CFLAGS += $(LIBIDL_CFLAGS) +# Do not link to jemalloc +ifeq ($(OS_ARCH),SunOS) +SOLARIS_JEMALLOC_LDFLAGS = +endif + # Compile directly against the static lib, so we can use xpidl during the build # without the shared library path being set. ifneq (,$(filter WINNT WINCE OS2,$(OS_ARCH))) diff --git a/xpcom/typelib/xpt/tools/Makefile.in b/xpcom/typelib/xpt/tools/Makefile.in index c027c41cf0cf..c24f0d80f6c4 100644 --- a/xpcom/typelib/xpt/tools/Makefile.in +++ b/xpcom/typelib/xpt/tools/Makefile.in @@ -62,6 +62,11 @@ LIBS = $(DIST)/lib/$(LIB_PREFIX)xpt.$(LIB_SUFFIX) include $(topsrcdir)/config/rules.mk +# Do not link to jemalloc +ifeq ($(OS_ARCH),SunOS) +SOLARIS_JEMALLOC_LDFLAGS = +endif + # Compile directly against the static lib, so we can use the tools # during the build without the shared library path being set. ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))