Bug 1014300 - Ship replace_jemalloc library (jemalloc3) when replace-malloc is enabled. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 23 May 2014 07:24:22 +0900
changeset 184500 563d76feab35
parent 184499 60793d877475
child 184501 f37de5ce263d
push id43864
push usermh@glandium.org
push date2014-05-22 22:28 +0000
treeherdermozilla-inbound@f37de5ce263d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1014300
milestone32.0a1
Bug 1014300 - Ship replace_jemalloc library (jemalloc3) when replace-malloc is enabled. r=mshal
b2g/installer/Makefile.in
b2g/installer/package-manifest.in
browser/installer/Makefile.in
browser/installer/package-manifest.in
memory/replace/jemalloc/moz.build
memory/replace/moz.build
--- a/b2g/installer/Makefile.in
+++ b/b2g/installer/Makefile.in
@@ -60,16 +60,23 @@ endif
 ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
 DEFINES += -DMOZ_RTSP
 endif
 
 ifdef GKMEDIAS_SHARED_LIBRARY
 DEFINES += -DGKMEDIAS_SHARED_LIBRARY
 endif
 
+ifdef MOZ_REPLACE_MALLOC
+DEFINES += -DMOZ_REPLACE_MALLOC
+endif
+ifdef MOZ_JEMALLOC3
+DEFINES += -DMOZ_JEMALLOC3
+endif
+
 ifdef MOZ_PKG_MANIFEST_P
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) FORCE
 	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
 ifdef MOZ_CHROME_MULTILOCALE
 	printf '\n[multilocale]\n' >> $@
 	for LOCALE in $(MOZ_CHROME_MULTILOCALE) ;\
 	do \
 	  printf '$(BINPATH)/chrome/'"$$LOCALE"'$(JAREXT)\n' >> $@; \
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -80,16 +80,21 @@
 @BINPATH@/msvcp120.dll
 @BINPATH@/msvcr120.dll
 #endif
 #endif
 #endif
 #ifdef MOZ_SHARED_MOZGLUE
 @BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
 #endif
+#ifdef MOZ_REPLACE_MALLOC
+#ifndef MOZ_JEMALLOC3
+@BINPATH@/@DLL_PREFIX@replace_jemalloc@DLL_SUFFIX@
+#endif
+#endif
 #ifdef ANDROID
 @BINPATH@/AndroidManifest.xml
 @BINPATH@/resources.arsc
 @BINPATH@/classes.dex
 @BINPATH@/res/drawable
 @BINPATH@/res/drawable-hdpi
 @BINPATH@/res/layout
 #endif
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -118,16 +118,22 @@ DEFINES += -DBINPATH=$(BINPATH)
 
 DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION)
 ifdef MOZ_NATIVE_ICU
 DEFINES += -DMOZ_NATIVE_ICU
 endif
 ifdef MOZ_SHARED_ICU
 DEFINES += -DMOZ_SHARED_ICU
 endif
+ifdef MOZ_REPLACE_MALLOC
+DEFINES += -DMOZ_REPLACE_MALLOC
+endif
+ifdef MOZ_JEMALLOC3
+DEFINES += -DMOZ_JEMALLOC3
+endif
 
 libs::
 	$(MAKE) -C $(DEPTH)/browser/locales langpack
 
 ifeq (WINNT,$(OS_ARCH))
 PKGCOMP_FIND_OPTS =
 else
 PKGCOMP_FIND_OPTS = -L
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -116,16 +116,21 @@
 @BINPATH@/libicuuc.@MOZ_ICU_VERSION@.dylib
 #elif defined(XP_UNIX)
 @BINPATH@/libicudata.so.@MOZ_ICU_VERSION@
 @BINPATH@/libicui18n.so.@MOZ_ICU_VERSION@
 @BINPATH@/libicuuc.so.@MOZ_ICU_VERSION@
 #endif
 #endif
 #endif
+#ifdef MOZ_REPLACE_MALLOC
+#ifndef MOZ_JEMALLOC3
+@BINPATH@/@DLL_PREFIX@replace_jemalloc@DLL_SUFFIX@
+#endif
+#endif
 
 [browser]
 ; [Base Browser Files]
 #ifndef XP_UNIX
 @BINPATH@/@MOZ_APP_NAME@.exe
 #else
 @BINPATH@/@MOZ_APP_NAME@-bin
 @BINPATH@/@MOZ_APP_NAME@
--- a/memory/replace/jemalloc/moz.build
+++ b/memory/replace/jemalloc/moz.build
@@ -1,14 +1,13 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # 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/.
-NO_DIST_INSTALL = True
 
 SOURCES += [
     '../../build/jemalloc_config.c',
     '../../build/mozjemalloc_compat.c',
 ]
 
 # Android doesn't have pthread_atfork, so just implement a dummy function.
 # It shouldn't make much problem, as the use of fork is pretty limited on
--- a/memory/replace/moz.build
+++ b/memory/replace/moz.build
@@ -1,11 +1,11 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # 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/.
 
 # Build jemalloc3 as a replace-malloc lib when building with mozjemalloc
-if not CONFIG['MOZ_JEMALLOC']:
+if not CONFIG['MOZ_JEMALLOC3']:
     DIRS += ['jemalloc']
 
 DISABLE_STL_WRAPPING = True