Bug 1155438 - Don't permit inconsistent values of MOZ_MEMORY between js/src and the top level. r=glandium, a=lizzard
authorJim Blandy <jimb@mozilla.com>
Wed, 22 Apr 2015 09:14:18 -0700
changeset 265795 4ce2712ce3f3513d39f7a5c28fe36e876575961e
parent 265794 5aa451309199c8f5155266fd60e9554c303e3629
child 265796 e831b9c65796cbc2e98b043b1706d41cf89097c4
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, lizzard
bugs1155438
milestone39.0a2
Bug 1155438 - Don't permit inconsistent values of MOZ_MEMORY between js/src and the top level. r=glandium, a=lizzard
configure.in
js/src/configure.in
--- a/configure.in
+++ b/configure.in
@@ -9253,16 +9253,17 @@ export MOZ_APP_REMOTINGNAME
 export DONT_POPULATE_VIRTUALENV=1
 export PYTHON
 export MOZILLA_CENTRAL_PATH=$_topsrcdir
 export STLPORT_CPPFLAGS
 export STLPORT_LIBS
 export JS_STANDALONE=no
 export MOZ_LINKER
 export ZLIB_IN_MOZGLUE
+export MOZ_MEMORY
 
 if ! test -e js; then
     mkdir js
 fi
 
 AC_OUTPUT_SUBDIRS(js/src,$cache_file)
 ac_configure_args="$_SUBDIR_CONFIG_ARGS"
 
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2990,20 +2990,28 @@ if test "$MOZ_DMD"; then
         CFLAGS="$CFLAGS -funwind-tables"
         CXXFLAGS="$CXXFLAGS -funwind-tables"
     fi
 fi
 
 dnl ========================================================
 dnl = Enable jemalloc
 dnl ========================================================
-MOZ_MEMORY=1
+
+LOCAL_MOZ_MEMORY=1
 MOZ_ARG_DISABLE_BOOL(jemalloc,
 [  --disable-jemalloc       Don't replace memory allocator with jemalloc],
-    MOZ_MEMORY=)
+    LOCAL_MOZ_MEMORY=)
+
+dnl Consult the command-line arguments in stand alone-builds only. In
+dnl non-stand-alone builds, we always use the value of MOZ_MEMORY inherited from
+dnl the top-level configure script.
+if test "$JS_STANDALONE"; then
+    MOZ_MEMORY=$LOCAL_MOZ_MEMORY
+fi
 
 case "${OS_TARGET}" in
 Android|WINNT|Darwin)
   MOZ_GLUE_IN_PROGRAM=
   ;;
 *)
   dnl On !Android !Windows !OSX, we only want to link executables against mozglue
   MOZ_GLUE_IN_PROGRAM=1