Bug 947299 - Don't build ICU as a shared library when building JS in standalone mode; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 06 Dec 2013 21:07:02 -0500
changeset 175047 77d06ee9ac48015d4ddbb28e55c8559f693fc7e3
parent 175027 33e4d9281b5dd50c23e1fd849427058923dcf876
child 175048 701c8c3fb4093e5f8ef70866845a91037430226c
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs947299
milestone28.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 947299 - Don't build ICU as a shared library when building JS in standalone mode; r=glandium X-Git-Commit-ID: 4664ac89e5ef60181b1c783cced3c323d11d6e43
build/autoconf/icu.m4
js/src/Makefile.in
js/src/build/autoconf/icu.m4
js/src/configure.in
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -17,15 +17,15 @@ AC_DEFUN([MOZ_CONFIG_ICU], [
     fi
 
     version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
     if test x"$version" = x; then
        AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno])
     fi
     MOZ_ICU_VERSION="$version"
 
-    if test -n "${JS_SHARED_LIBRARY}${MOZ_NATIVE_ICU}"; then
+    if test -z "${JS_STANDALONE}" -a -n "${JS_SHARED_LIBRARY}${MOZ_NATIVE_ICU}"; then
         MOZ_SHARED_ICU=1
     fi
 
     AC_SUBST(MOZ_ICU_VERSION)
     AC_SUBST(MOZ_SHARED_ICU)
 ])
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -120,16 +120,17 @@ jsconfig_DEST = $(DIST)/include
 jsconfig_TARGET := export
 
 # Ensure that this happens before using $(MOZ_PSEUDO_DERECURSE)
 include $(topsrcdir)/config/config.mk
 
 # Ensure that this happens before including rules.mk
 ifdef ENABLE_INTL_API
 ifndef MOZ_NATIVE_ICU
+ifdef MOZ_SHARED_ICU
 ifeq ($(OS_ARCH),WINNT)
   # Library names: On Windows, ICU uses modified library names for static
   # and debug libraries.
   ifdef MOZ_DEBUG
     ICU_LIB_SUFFIX=d
   endif
   ifdef JS_SHARED_LIBRARY
     ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),intl/icu/target/lib/$(libname)$(ICU_LIB_SUFFIX)$(MOZ_ICU_VERSION).dll)
@@ -151,16 +152,17 @@ endif
 ifdef ICU_FILES
   ICU_DEST := $(DIST)/bin
   INSTALL_TARGETS += ICU
   $(ICU_FILES): buildicu
   ICU_TARGET := $(if $(MOZ_PSEUDO_DERECURSE),compile,export)
 endif
 endif
 endif
+endif
 
 include $(topsrcdir)/config/rules.mk
 
 .PHONY: buildffi buildicu
 buildffi buildicu:
 $(if $(MOZ_PSEUDO_DERECURSE),compile,export):: buildffi buildicu
 
 ifdef JS_HAS_CTYPES
--- a/js/src/build/autoconf/icu.m4
+++ b/js/src/build/autoconf/icu.m4
@@ -17,15 +17,15 @@ AC_DEFUN([MOZ_CONFIG_ICU], [
     fi
 
     version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
     if test x"$version" = x; then
        AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno])
     fi
     MOZ_ICU_VERSION="$version"
 
-    if test -n "${JS_SHARED_LIBRARY}${MOZ_NATIVE_ICU}"; then
+    if test -z "${JS_STANDALONE}" -a -n "${JS_SHARED_LIBRARY}${MOZ_NATIVE_ICU}"; then
         MOZ_SHARED_ICU=1
     fi
 
     AC_SUBST(MOZ_ICU_VERSION)
     AC_SUBST(MOZ_SHARED_ICU)
 ])
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -4208,55 +4208,55 @@ if test -n "$ENABLE_INTL_API"; then
     AC_DEFINE(ENABLE_INTL_API)
 
     MOZ_CONFIG_ICU()
 
     if test -z "$MOZ_NATIVE_ICU"; then
         case "$OS_TARGET" in
             WINNT)
                 ICU_LIB_NAMES="icuin icuuc icudt"
-                if test "$DISABLE_SHARED_JS" != "1"; then
+                if test -n "$MOZ_SHARED_ICU"; then
                     DBG_SUFFIX=
                     if test -n "$MOZ_DEBUG"; then
                         DBG_SUFFIX=d
                     fi
                     MOZ_ICU_LIBS='$(foreach lib,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(LIB_PREFIX)$(lib)$(DBG_SUFFIX).$(LIB_SUFFIX))'
                 fi
                 ;;
             Darwin)
                 ICU_LIB_NAMES="icui18n icuuc icudata"
-                if test "$DISABLE_SHARED_JS" != "1"; then
+                if test -n "$MOZ_SHARED_ICU"; then
                    MOZ_ICU_LIBS='$(foreach lib,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(lib).$(MOZ_ICU_VERSION)$(DLL_SUFFIX))'
                 fi
                 ;;
             Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
                 ICU_LIB_NAMES="icui18n icuuc icudata"
-                if test "$DISABLE_SHARED_JS" != "1"; then
+                if test -n "$MOZ_SHARED_ICU"; then
                    MOZ_ICU_LIBS='$(foreach lib,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(lib)$(DLL_SUFFIX).$(MOZ_ICU_VERSION))'
                 fi
                 ;;
             *)
                 AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
         esac
-        if test "$DISABLE_SHARED_JS" = "1"; then
+        if test -z "$MOZ_SHARED_ICU"; then
             MOZ_ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib)'
         fi
     fi
 fi
 
 AC_SUBST(DBG_SUFFIX)
 AC_SUBST(ENABLE_INTL_API)
 AC_SUBST(ICU_LIB_NAMES)
 AC_SUBST(MOZ_ICU_LIBS)
 AC_SUBST(MOZ_NATIVE_ICU)
 
 dnl Settings for ICU
 if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then
     dnl We build ICU as a static library for non-shared js builds and as a shared library for shared js builds.
-    if test "$DISABLE_SHARED_JS" = "1"; then
+    if test -z "$MOZ_SHARED_ICU"; then
         AC_DEFINE(U_STATIC_IMPLEMENTATION)
     else
         AC_DEFINE(U_COMBINED_IMPLEMENTATION)
     fi
 
     dnl Source files that use ICU should have control over which parts of the ICU
     dnl namespace they want to use.
     AC_DEFINE(U_USING_ICU_NAMESPACE,0)
@@ -4342,17 +4342,17 @@ if test -n "$ENABLE_INTL_API" -a -z "$MO
         ICU_CROSS_BUILD_OPT="--with-cross-build=$ICU_HOST_PATH"
         ICU_TARGET_OPT="--build=$build --host=$target"
     else
         # CROSS_COMPILE isn't set build and target are i386 and x86-64.
         # So we must set target for --build and --host.
         ICU_TARGET_OPT="--build=$target --host=$target"
     fi
 
-    if test "$DISABLE_SHARED_JS" = "1"; then
+    if test -z "$MOZ_SHARED_ICU"; then
         # To reduce library size, use static linking
         ICU_LINK_OPTS="--enable-static --disable-shared"
     else
         ICU_LINK_OPTS="--disable-static --enable-shared"
     fi
     # Force the ICU static libraries to be position independent code
     ICU_CFLAGS="$DSO_PIC_CFLAGS $CFLAGS"
     ICU_CXXFLAGS="$DSO_PIC_CFLAGS $CXXFLAGS"