Bug 1257468 - Move JS_STANDALONE to moz.configure. r=nalexander
☠☠ backed out by 22fcb50e9842 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 18 Mar 2016 19:03:09 +0900
changeset 329583 f5090987b7c69d35ec7cfbc1829ccf31676947d5
parent 329582 48a94777837d09a7a4dad6290738d56fc0d36f8d
child 329584 4c575b4f5492cadf448bf4e77504bce4ad51957f
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1257468
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1257468 - Move JS_STANDALONE to moz.configure. r=nalexander
build/moz.configure/init.configure
js/moz.configure
js/src/old-configure.in
old-configure.in
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -250,16 +250,17 @@ 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',
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -3,38 +3,48 @@
 # 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 js_shell_default(build_project, help):
+def building_js(build_project, help):
     return build_project == 'js'
 
-js_option('--disable-js-shell', default=js_shell_default,
+# 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,
        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
 # ==================================================================
-@depends(build_project, '--help')
-def js_shared_default(build_project, help):
-    return build_project == 'js'
-
-js_option('--disable-shared-js', default=js_shared_default,
+js_option('--disable-shared-js', default=building_js,
           help='Do not create a shared library')
 
-js_option('--disable-export-js', default=js_shared_default,
+js_option('--disable-export-js', default=building_js,
           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,26 +70,22 @@ 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 "$JS_STANDALONE" = no; then
+if test -z "$JS_STANDALONE"; 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)
 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
@@ -7934,17 +7934,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=no
+export JS_STANDALONE=
 export DIST
 export MOZ_LINKER
 export ZLIB_IN_MOZGLUE
 export MOZ_MEMORY
 export AR
 export RANLIB
 export CPP
 export CC