Backout changesets f5090987b7c6, 48a94777837d and a63437a74f7a (bug 1257468) for SM bustage on a CLOSED TREE
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 22 Mar 2016 08:26:57 +0900
changeset 289734 22fcb50e9842f1ccd229e689e106e038afafd546
parent 289733 4c575b4f5492cadf448bf4e77504bce4ad51957f
child 289735 7f3a38541755d5803b13a9a794a687d19c50aec4
push id18304
push usercbook@mozilla.com
push dateTue, 22 Mar 2016 11:33:07 +0000
treeherderfx-team@f18cffdb2277 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1257468
milestone48.0a1
backs outf5090987b7c69d35ec7cfbc1829ccf31676947d5
48a94777837d09a7a4dad6290738d56fc0d36f8d
a63437a74f7a04b32acf896e4484e31b25558d8a
Backout changesets f5090987b7c6, 48a94777837d and a63437a74f7a (bug 1257468) for SM bustage on a CLOSED TREE
build/autoconf/ffi.m4
build/autoconf/icu.m4
build/autoconf/jemalloc.m4
build/autoconf/nspr-build.m4
build/moz.configure/init.configure
configure.py
js/moz.configure
js/src/old-configure.in
old-configure.in
--- a/build/autoconf/ffi.m4
+++ b/build/autoconf/ffi.m4
@@ -18,17 +18,17 @@ if test -n "$MOZ_SYSTEM_FFI"; then
     fi
 fi
 
 AC_SUBST(MOZ_SYSTEM_FFI)
 
 ])
 
 AC_DEFUN([MOZ_SUBCONFIGURE_FFI], [
-if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
+if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
 
   if test "$BUILD_CTYPES" -a -z "$MOZ_SYSTEM_FFI"; then
     # Run the libffi 'configure' script.
     ac_configure_args="--disable-shared --enable-static --disable-raw-api"
     if test "$MOZ_DEBUG"; then
       ac_configure_args="$ac_configure_args --enable-debug"
     fi
     if test "$DSO_PIC_CFLAGS"; then
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -123,17 +123,17 @@ if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM
     AC_DEFINE(U_USING_ICU_NAMESPACE,0)
 fi
 
 
 ])
 
 AC_DEFUN([MOZ_SUBCONFIGURE_ICU], [
 
-if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
+if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
 
     if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
         # Set ICU compile options
         ICU_CPPFLAGS=""
         # don't use icu namespace automatically in client code
         ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_USING_ICU_NAMESPACE=0"
         # don't include obsolete header files
         ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
--- a/build/autoconf/jemalloc.m4
+++ b/build/autoconf/jemalloc.m4
@@ -1,15 +1,15 @@
 dnl This Source Code Form is subject to the terms of the Mozilla Public
 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 AC_DEFUN([MOZ_SUBCONFIGURE_JEMALLOC], [
 
-if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
+if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
 
   # Run jemalloc configure script
 
   if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then
     ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind"
     # We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c
     # on Windows, so just export memalign on all platforms.
     ac_configure_args="$ac_configure_args ac_cv_func_memalign=yes"
--- a/build/autoconf/nspr-build.m4
+++ b/build/autoconf/nspr-build.m4
@@ -3,21 +3,21 @@ dnl License, v. 2.0. If a copy of the MP
 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 AC_DEFUN([MOZ_CONFIG_NSPR], [
 
 ifelse([$1],,define(CONFIGURING_JS,yes))
 
 dnl Possible ways this can be called:
 dnl   from toplevel configure:
-dnl     JS_STANDALONE=  MOZ_BUILD_APP!=js
+dnl     JS_STANDALONE=  BUILDING_JS=
 dnl   from js/src/configure invoked by toplevel configure:
-dnl     JS_STANDALONE=  MOZ_BUILD_APP=js
+dnl     JS_STANDALONE=  BUILDING_JS=1
 dnl   from standalone js/src/configure:
-dnl     JS_STANDALONE=1 MOZ_BUILD_APP=js
+dnl     JS_STANDALONE=1 BUILDING_JS=1
 
 dnl ========================================================
 dnl = Find the right NSPR to use.
 dnl ========================================================
 MOZ_ARG_WITH_STRING(nspr-cflags,
 [  --with-nspr-cflags=FLAGS
                           Pass FLAGS to CC when building code that uses NSPR.
                           Use this when there's no accurate nspr-config
@@ -33,17 +33,17 @@ MOZ_ARG_WITH_STRING(nspr-libs,
 
 ifdef([CONFIGURING_JS],[
     MOZ_ARG_ENABLE_BOOL(nspr-build,
 [  --enable-nspr-build     Build NSPR from source tree],
         MOZ_BUILD_NSPR=1,
         MOZ_BUILD_NSPR=)
 ])
 
-if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then
+if test -z "$BUILDING_JS" || test -n "$JS_STANDALONE"; then
   _IS_OUTER_CONFIGURE=1
 fi
 
 MOZ_ARG_WITH_BOOL(system-nspr,
 [  --with-system-nspr      Use an NSPR that is already built and installed.
                           Use the 'nspr-config' script in the current path,
                           or look for the script in the directories given with
                           --with-nspr-exec-prefix or --with-nspr-prefix.
@@ -94,17 +94,17 @@ fi
 if test "$JS_POSIX_NSPR" = unset; then
     JS_POSIX_NSPR=
 else
     nspr_opts="x$nspr_opts"
     which_nspr="posix-wrapper"
 fi
 
 if test -z "$nspr_opts"; then
-    if test "$MOZ_BUILD_APP" != js; then
+    if test -z "$BUILDING_JS"; then
       dnl Toplevel configure defaults to using nsprpub from the source tree
       MOZ_BUILD_NSPR=1
       which_nspr="source-tree"
     else
       dnl JS configure defaults to emulated NSPR if available, falling back
       dnl to nsprpub.
       JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT"
       if test -z "$JS_POSIX_NSPR"; then
@@ -119,17 +119,17 @@ fi
 if test -z "$nspr_opts" || test "$nspr_opts" = x; then
     AC_MSG_RESULT($which_nspr)
 else
     AC_MSG_ERROR([only one way of using NSPR may be selected. See 'configure --help'.])
 fi
 
 AC_SUBST(MOZ_BUILD_NSPR)
 
-if test "$MOZ_BUILD_APP" = js; then
+if test -n "$BUILDING_JS"; then
   if test "$JS_POSIX_NSPR" = 1; then
     AC_DEFINE(JS_POSIX_NSPR)
   fi
   AC_SUBST(JS_POSIX_NSPR)
 fi
 
 # A (sub)configure invoked by the toplevel configure will always receive
 # --with-nspr-libs on the command line. It will never need to figure out
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -250,17 +250,16 @@ def wanted_mozconfig_variables(help):
          'AUTOCONF',
          'AWK',
          'DISABLE_EXPORT_JS',
          'DISABLE_SHARED_JS',
          'DOXYGEN',
          'DSYMUTIL',
          'EXTERNAL_SOURCE_DIR',
          'GENISOIMAGE',
-         'JS_STANDALONE',
          'L10NBASEDIR',
          'MOZILLABUILD',
          'MOZ_ARTIFACT_BUILDS',
          'MOZ_BUILD_APP',
          'MOZ_CALLGRIND',
          'MOZ_DMD',
          'MOZ_FMP4',
          'MOZ_INSTRUMENT_EVENT_LOOP',
@@ -576,18 +575,16 @@ def include_project_configure(project, e
     if not os.path.exists(path):
         error('Cannot find project %s' % project[0])
     return path
 
 @depends(include_project_configure, check_build_environment, '--help')
 def build_project(include_project_configure, build_env, help):
     ret = os.path.dirname(os.path.relpath(include_project_configure,
                                           build_env['TOPSRCDIR']))
-    set_config('MOZ_BUILD_APP', ret)
-    set_define('MOZ_BUILD_APP', ret)
     add_old_configure_assignment('MOZ_BUILD_APP', ret)
     return ret
 
 
 # set RELEASE_BUILD and NIGHTLY_BUILD variables depending on the cycle we're in
 # The logic works like this:
 # - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
 # - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
--- a/configure.py
+++ b/configure.py
@@ -53,28 +53,28 @@ def config_status(config):
         fh.write('true, false, null = True, False, None\n')
         for k, v in sanitized_config.iteritems():
             fh.write('%s = ' % k)
             json.dump(v, fh, sort_keys=True, indent=4, ensure_ascii=False)
             fh.write('\n')
         fh.write("__all__ = ['topobjdir', 'topsrcdir', 'defines', "
                  "'non_global_defines', 'substs']")
 
-        if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
+        if not config.get('BUILDING_JS') or config.get('JS_STANDALONE'):
             fh.write('''
 if __name__ == '__main__':
     args = dict([(name, globals()[name]) for name in __all__])
     from mozbuild.config_status import config_status
     config_status(**args)
 ''')
 
     # Other things than us are going to run this file, so we need to give it
     # executable permissions.
     os.chmod('config.status', 0755)
-    if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
+    if not config.get('BUILDING_JS') or config.get('JS_STANDALONE'):
         if not config.get('JS_STANDALONE'):
             os.environ['WRITE_MOZINFO'] = '1'
         # Until we have access to the virtualenv from this script, execute
         # config.status externally, with the virtualenv python.
         return subprocess.call([config['PYTHON'], 'config.status'])
     return 0
 
 
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -3,48 +3,38 @@
 # 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/.
 
 # /!\ Use js_option() instead of option() in this file. /!\
 # =========================================================
 
 @depends(build_project, '--help')
-def building_js(build_project, help):
+def js_shell_default(build_project, help):
     return build_project == 'js'
 
-# Exception to the rule above: JS_STANDALONE is a special option that doesn't
-# want the js_option treatment. When we're done merging js/src/configure and
-# top-level configure, it can go away, although the JS_STANDALONE config
-# will still need to be set depending on building_js above.
-option(env='JS_STANDALONE', default=building_js,
-       help='Reserved for internal use')
-
-@depends('JS_STANDALONE')
-def js_standalone(value):
-    if value:
-        set_config('JS_STANDALONE', '1')
-        add_old_configure_assignment('JS_STANDALONE', '1')
-
-
-js_option('--disable-js-shell', default=building_js,
+js_option('--disable-js-shell', default=js_shell_default,
        help='Do not build the JS shell')
 
 @depends('--disable-js-shell')
 def js_shell(value):
     if not value:
         set_config('JS_DISABLE_SHELL', '1')
 
 
 # SpiderMonkey as a shared library, and how its symbols are exported
 # ==================================================================
-js_option('--disable-shared-js', default=building_js,
+@depends(build_project, '--help')
+def js_shared_default(build_project, help):
+    return build_project == 'js'
+
+js_option('--disable-shared-js', default=js_shared_default,
           help='Do not create a shared library')
 
-js_option('--disable-export-js', default=building_js,
+js_option('--disable-export-js', default=js_shared_default,
           help='Do not mark JS symbols as DLL exported/visible')
 
 @depends('--disable-shared-js', '--disable-export-js')
 def static_js(shared_js, export_js):
     if shared_js:
         if not export_js:
             error('Must export JS symbols when building a shared library.')
         set_config('JS_SHARED_LIBRARY', '1')
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -70,22 +70,28 @@ dnl Do not allow objdir == srcdir builds
 dnl ==============================================================
 _topsrcdir=`cd $srcdir; pwd -W 2>/dev/null || pwd -P`
 _objdir=`pwd -P`
 
 MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd -P`
 
 MOZ_DEFAULT_COMPILER
 
-if test -z "$JS_STANDALONE"; then
+if test "$JS_STANDALONE" = no; then
   autoconfmk=autoconf-js.mk
+  JS_STANDALONE=
   #DIST is exported from top-level configure
 else
+  JS_STANDALONE=1
+  AC_DEFINE(JS_STANDALONE)
   DIST="$MOZ_BUILD_ROOT/dist"
 fi
+AC_SUBST(JS_STANDALONE)
+BUILDING_JS=1
+AC_SUBST(BUILDING_JS)
 AC_SUBST(autoconfmk)
 
 MOZ_ARG_WITH_STRING(gonk-toolchain-prefix,
 [  --with-gonk-toolchain-prefix=DIR
                           prefix to gonk toolchain commands],
     gonk_toolchain_prefix=$withval)
 
 if test -n "$gonkdir" ; then
--- a/old-configure.in
+++ b/old-configure.in
@@ -3092,23 +3092,26 @@ fi
 
 # Propagate feature switches for code written in rust from confvars.sh
 if test -n "$MOZ_RUST"; then
     if test -n "$MOZ_RUST_MP4PARSE"; then
         AC_DEFINE(MOZ_RUST_MP4PARSE)
     fi
 fi
 
+AC_SUBST(MOZ_BUILD_APP)
 AC_SUBST(MOZ_PHOENIX)
 AC_SUBST(MOZ_XULRUNNER)
 AC_SUBST(MOZ_B2G)
 AC_SUBST(MOZ_MULET)
 AC_SUBST(MOZ_B2G_VERSION)
 AC_SUBST(MOZ_B2GDROID)
 
+AC_DEFINE_UNQUOTED(MOZ_BUILD_APP,$MOZ_BUILD_APP)
+
 dnl ========================================================
 dnl Ensure Android SDK and build-tools versions depending on
 dnl mobile target.
 dnl ========================================================
 
 if test -z "$gonkdir" ; then
     case "$MOZ_BUILD_APP" in
     mobile/android | mobile/android/b2gdroid)
@@ -7934,17 +7937,17 @@ export MOZ_SYSTEM_ZLIB
 export MOZ_ZLIB_CFLAGS
 export MOZ_ZLIB_LIBS
 export MOZ_APP_NAME
 export MOZ_APP_REMOTINGNAME
 export RUSTC
 export MOZILLA_CENTRAL_PATH=$_topsrcdir
 export STLPORT_CPPFLAGS
 export STLPORT_LIBS
-export JS_STANDALONE=
+export JS_STANDALONE=no
 export DIST
 export MOZ_LINKER
 export ZLIB_IN_MOZGLUE
 export MOZ_MEMORY
 export AR
 export RANLIB
 export CPP
 export CC