Bug 920731 - stop exporting JS symbols from libxul in Firefox builds. r=glandium sr=bz
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 30 Sep 2013 16:09:28 -0400
changeset 163188 e0c4be8e37c56a78eda814823a9d3dcde031d63b
parent 163187 e403b2561ceba12d39b3823249aed3bdf413ffdc
child 163189 3b0e9448a2edb778625adf4d6ed279c07f05ad4b
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, bz
bugs920731
milestone27.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 920731 - stop exporting JS symbols from libxul in Firefox builds. r=glandium sr=bz
browser/confvars.sh
configure.in
js/src/configure.in
js/xpconnect/src/XPCShellImpl.cpp
js/xpconnect/src/jsshell.msg
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -19,16 +19,17 @@ if test "$OS_ARCH" = "WINNT"; then
       if ! test "$MOZ_DEBUG"; then
         MOZ_STUB_INSTALLER=1
       fi
     fi
   fi
 fi
 
 MOZ_CHROME_FILE_FORMAT=omni
+MOZ_DISABLE_EXPORT_JS=1
 MOZ_SAFE_BROWSING=1
 MOZ_SERVICES_COMMON=1
 MOZ_SERVICES_CRYPTO=1
 MOZ_SERVICES_HEALTHREPORT=1
 MOZ_SERVICES_METRICS=1
 MOZ_SERVICES_SYNC=1
 MOZ_APP_VERSION=$FIREFOX_VERSION
 MOZ_EXTENSIONS_DEFAULT=" gio"
--- a/configure.in
+++ b/configure.in
@@ -9215,16 +9215,19 @@ fi
 ac_configure_args="$ac_configure_args $WITH_INTL"
 
 if test "$BUILD_CTYPES"; then
     # Build js-ctypes on the platforms we can.
     ac_configure_args="$ac_configure_args --enable-ctypes"
 fi
 if test -z "$JS_SHARED_LIBRARY" ; then
     ac_configure_args="$ac_configure_args --disable-shared-js"
+    if test -n "$MOZ_DISABLE_EXPORT_JS"; then
+        ac_configure_args="$ac_configure_args --disable-export-js"
+    fi
 fi
 if test -z "$MOZ_NATIVE_NSPR"; then
     ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'"
     ac_configure_args="$ac_configure_args --with-nspr-libs='$NSPR_LIBS'"
 fi
 ac_configure_args="$ac_configure_args --with-dist-dir=../../dist"
 ac_configure_args="$ac_configure_args --prefix=$dist"
 if test "$MOZ_MEMORY"; then
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -133,19 +133,32 @@ if test -z "$PERL" -o "$PERL" = ":"; the
 fi
 
 MOZ_ARG_ENABLE_BOOL(shared-js,
 [  --disable-shared-js
                           Do not create a shared library.],
     DISABLE_SHARED_JS=0,
     DISABLE_SHARED_JS=1)
 
+MOZ_ARG_DISABLE_BOOL(export-js,
+[  --disable-export-js
+                          Do not mark JS symbols as DLL exported/visible.],
+    DISABLE_EXPORT_JS=1,
+    DISABLE_SHARED_JS=)
+
 if test "$DISABLE_SHARED_JS" = "1" ; then
-  AC_DEFINE(STATIC_EXPORTABLE_JS_API)
+  if test "$DISABLE_EXPORT_JS" = "1"; then
+    AC_DEFINE(STATIC_JS_API)
+  else
+    AC_DEFINE(STATIC_EXPORTABLE_JS_API)
+  fi
 else
+  if test "$DISABLE_EXPORT_JS" = "1"; then
+    AC_MSG_ERROR([Must export JS symbols when building a shared library.])
+  fi
   JS_SHARED_LIBRARY=1
 fi
 AC_SUBST(JS_SHARED_LIBRARY)
 
 if test "$JS_STANDALONE" = no; then
   JS_STANDALONE=
 else
   JS_STANDALONE=1