bug 1247396 - drop support for MOZ_SHARED_ICU. r=glandium
☠☠ backed out by 4a3ac7d3049c ☠ ☠
authorTed Mielczarek <ted@mielczarek.org>
Thu, 11 Feb 2016 08:21:16 -0500
changeset 290411 e40580ed0fe6fab50f1d8d23747c2cf423d93016
parent 290410 8e8e5cdc1ff48176c1ddec999aec28f07e9d1c3d
child 290412 06a0c49f1206457a0a30138409a5e770e896f81b
push idunknown
push userunknown
push dateunknown
reviewersglandium
bugs1247396
milestone48.0a1
bug 1247396 - drop support for MOZ_SHARED_ICU. r=glandium MozReview-Commit-ID: 54AQdzJqvvA
b2g/installer/Makefile.in
b2g/installer/package-manifest.in
browser/installer/Makefile.in
browser/installer/package-manifest.in
build/autoconf/icu.m4
config/external/icu/Makefile.in
config/external/icu/moz.build
config/moz.build
config/system-headers
toolkit/mozapps/installer/upload-files.mk
--- a/b2g/installer/Makefile.in
+++ b/b2g/installer/Makefile.in
@@ -97,19 +97,16 @@ endif
 ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
 DEFINES += -DMOZ_RTSP
 endif
 
 DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION)
 ifdef MOZ_SYSTEM_ICU
 DEFINES += -DMOZ_SYSTEM_ICU
 endif
-ifdef MOZ_SHARED_ICU
-DEFINES += -DMOZ_SHARED_ICU
-endif
 DEFINES += -DMOZ_ICU_DBG_SUFFIX=$(MOZ_ICU_DBG_SUFFIX)
 
 ifneq (,$(filter gtk%,$(MOZ_WIDGET_TOOLKIT)))
 DEFINES += -DMOZ_GTK=1
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk3)
 DEFINES += -DMOZ_GTK3=1
 endif
 endif
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -67,31 +67,16 @@
 @BINPATH@/@MSVC_CXX_RUNTIME_DLL@
 #endif
 #if MOZ_PACKAGE_WIN_UCRT_DLLS
 @BINPATH@/api-ms-win-*.dll
 @BINPATH@/ucrtbase.dll
 #endif
 #endif
 #ifndef MOZ_SYSTEM_ICU
-#ifdef MOZ_SHARED_ICU
-#ifdef XP_WIN
-@BINPATH@/icudt@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
-@BINPATH@/icuin@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
-@BINPATH@/icuuc@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
-#elif defined(XP_MACOSX)
-@BINPATH@/libicudata.@MOZ_ICU_VERSION@.dylib
-@BINPATH@/libicui18n.@MOZ_ICU_VERSION@.dylib
-@BINPATH@/libicuuc.@MOZ_ICU_VERSION@.dylib
-#elif defined(XP_UNIX)
-@BINPATH@/libicudata.so.@MOZ_ICU_VERSION@
-@BINPATH@/libicui18n.so.@MOZ_ICU_VERSION@
-@BINPATH@/libicuuc.so.@MOZ_ICU_VERSION@
-#endif
-#endif
 #endif
 #ifdef MOZ_SHARED_MOZGLUE
 @BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
 #endif
 #ifdef ANDROID
 @RESPATH@/AndroidManifest.xml
 @RESPATH@/resources.arsc
 @RESPATH@/classes.dex
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -116,19 +116,16 @@ LPROJ_ROOT := $(subst -,_,$(AB_CD))
 endif
 endif
 DEFINES += -DLPROJ_ROOT=$(LPROJ_ROOT)
 
 DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION)
 ifdef MOZ_SYSTEM_ICU
 DEFINES += -DMOZ_SYSTEM_ICU
 endif
-ifdef MOZ_SHARED_ICU
-DEFINES += -DMOZ_SHARED_ICU
-endif
 DEFINES += -DMOZ_ICU_DBG_SUFFIX=$(MOZ_ICU_DBG_SUFFIX)
 ifdef CLANG_CXX
 DEFINES += -DCLANG_CXX
 endif
 ifdef CLANG_CL
 DEFINES += -DCLANG_CL
 endif
 ifeq (x86,$(CPU_ARCH))
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -93,31 +93,16 @@
 @BINPATH@/@MSVC_CXX_RUNTIME_DLL@
 #endif
 #if MOZ_PACKAGE_WIN_UCRT_DLLS
 @BINPATH@/api-ms-win-*.dll
 @BINPATH@/ucrtbase.dll
 #endif
 #endif
 #ifndef MOZ_SYSTEM_ICU
-#ifdef MOZ_SHARED_ICU
-#ifdef XP_WIN
-@BINPATH@/icudt@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
-@BINPATH@/icuin@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
-@BINPATH@/icuuc@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
-#elif defined(XP_MACOSX)
-@BINPATH@/libicudata.@MOZ_ICU_VERSION@.dylib
-@BINPATH@/libicui18n.@MOZ_ICU_VERSION@.dylib
-@BINPATH@/libicuuc.@MOZ_ICU_VERSION@.dylib
-#elif defined(XP_UNIX)
-@BINPATH@/libicudata.so.@MOZ_ICU_VERSION@
-@BINPATH@/libicui18n.so.@MOZ_ICU_VERSION@
-@BINPATH@/libicuuc.so.@MOZ_ICU_VERSION@
-#endif
-#endif
 #endif
 #ifdef MOZ_GTK3
 @BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
 @BINPATH@/gtk2/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
 #endif
 
 [browser]
 ; [Base Browser Files]
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -1,29 +1,26 @@
 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/.
 
 dnl Set the MOZ_ICU_VERSION variable to denote the current version of the
-dnl ICU library, and also the MOZ_SHARED_ICU which would be true if we are
-dnl linking against a shared library of ICU, either one that we build from
-dnl our copy of ICU or the system provided library.
+dnl ICU library, as well as a few other things.
 
 AC_DEFUN([MOZ_CONFIG_ICU], [
 
 ICU_LIB_NAMES=
 MOZ_SYSTEM_ICU=
 MOZ_ARG_WITH_BOOL(system-icu,
 [  --with-system-icu
                           Use system ICU (located with pkgconfig)],
     MOZ_SYSTEM_ICU=1)
 
 if test -n "$MOZ_SYSTEM_ICU"; then
     PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1)
-    MOZ_SHARED_ICU=1
 else
     MOZ_ICU_INCLUDES="/intl/icu/source/common /intl/icu/source/i18n"
 fi
 
 AC_SUBST_LIST(MOZ_ICU_INCLUDES)
 AC_SUBST(MOZ_SYSTEM_ICU)
 
 MOZ_ARG_WITH_STRING(intl-api,
@@ -74,31 +71,22 @@ if test -n "$USE_ICU"; then
     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 "$OS_TARGET" = WINNT; then
-        MOZ_SHARED_ICU=1
-    fi
-
-    if test -z "${JS_STANDALONE}" -a -n "${JS_SHARED_LIBRARY}${MOZ_SYSTEM_ICU}"; then
-        MOZ_SHARED_ICU=1
-    fi
-
     AC_SUBST(MOZ_ICU_VERSION)
-    AC_SUBST(MOZ_SHARED_ICU)
 
     if test -z "$MOZ_SYSTEM_ICU"; then
         case "$OS_TARGET" in
             WINNT)
-                ICU_LIB_NAMES="icuin icuuc icudt"
+                ICU_LIB_NAMES="sicuin sicuuc sicudt"
                 MOZ_ICU_DBG_SUFFIX=
                 if test -n "$MOZ_DEBUG" -a -z "$MOZ_NO_DEBUG_RTL"; then
                     MOZ_ICU_DBG_SUFFIX=d
                 fi
                 ;;
             Darwin|Linux|DragonFly|FreeBSD|NetBSD|OpenBSD|GNU/kFreeBSD|SunOS|Android)
                 ICU_LIB_NAMES="icui18n icuuc icudata"
                 ;;
@@ -109,20 +97,18 @@ if test -n "$USE_ICU"; then
 fi
 
 AC_SUBST(MOZ_ICU_DBG_SUFFIX)
 AC_SUBST(ENABLE_INTL_API)
 AC_SUBST(USE_ICU)
 AC_SUBST_LIST(ICU_LIB_NAMES)
 
 if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_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 -z "$MOZ_SHARED_ICU"; then
-        AC_DEFINE(U_STATIC_IMPLEMENTATION)
-    fi
+    dnl We build ICU as a static library.
+    AC_DEFINE(U_STATIC_IMPLEMENTATION)
     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)
 fi
 
 
 ])
 
@@ -193,22 +179,19 @@ if test "$MOZ_BUILD_APP" != js -o -n "$J
             ICU_CROSS_BUILD_OPT="--with-cross-build=$ICU_HOST_PATH --disable-tools"
             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 -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
+        # To reduce library size, use static linking
+        ICU_LINK_OPTS="--enable-static --disable-shared"
+
         # Force the ICU static libraries to be position independent code
         ICU_CFLAGS="$DSO_PIC_CFLAGS $CFLAGS"
         ICU_CXXFLAGS="$DSO_PIC_CFLAGS $CXXFLAGS"
 
         ICU_BUILD_OPTS=""
         if test -n "$MOZ_DEBUG" -o "MOZ_DEBUG_SYMBOLS"; then
             ICU_CFLAGS="$ICU_CFLAGS $MOZ_DEBUG_FLAGS"
             ICU_CXXFLAGS="$ICU_CXXFLAGS $MOZ_DEBUG_FLAGS"
@@ -271,23 +254,21 @@ if test "$MOZ_BUILD_APP" != js -o -n "$J
         fi
 
         if test -n "$gonkdir"; then
             ICU_CXXFLAGS="-I$gonkdir/abi/cpp/include $ICU_CXXFLAGS"
         elif test "$OS_TARGET" = Android -a "$MOZ_ANDROID_CXX_STL" = mozstlport; then
             ICU_CXXFLAGS="-I$_topsrcdir/build/gabi++/include $ICU_CXXFLAGS"
         fi
 
-        if test -z "$MOZ_SHARED_ICU"; then
-          ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_STATIC_IMPLEMENTATION"
-          ICU_CFLAGS="$ICU_CFLAGS -DU_STATIC_IMPLEMENTATION"
-          if test "$GNU_CC"; then
-            ICU_CFLAGS="$ICU_CFLAGS -fvisibility=hidden"
-            ICU_CXXFLAGS="$ICU_CXXFLAGS -fvisibility=hidden"
-          fi
+        ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_STATIC_IMPLEMENTATION"
+        ICU_CFLAGS="$ICU_CFLAGS -DU_STATIC_IMPLEMENTATION"
+        if test "$GNU_CC"; then
+          ICU_CFLAGS="$ICU_CFLAGS -fvisibility=hidden"
+          ICU_CXXFLAGS="$ICU_CXXFLAGS -fvisibility=hidden"
         fi
 
         (export AR="$AR"
          export RANLIB="$RANLIB"
          export CC="$CC"
          export CXX="$CXX"
          export LD="$LD"
          export ARFLAGS="$ARFLAGS"
--- a/config/external/icu/Makefile.in
+++ b/config/external/icu/Makefile.in
@@ -1,39 +1,24 @@
 # 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/.
 
 # Ensure that this happens before including rules.mk
 ifdef USE_ICU
   ifndef MOZ_SYSTEM_ICU
-  # Library names: On Windows, ICU uses modified library names for static
-  # and debug libraries.
-    ifdef MOZ_SHARED_ICU
-      ifeq ($(OS_ARCH),WINNT)
-        ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(libname)$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll)
-      else # ! WINNT
-        ifeq ($(OS_ARCH),Darwin)
-          ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname).$(MOZ_ICU_VERSION)$(DLL_SUFFIX))
-        else # ! Darwin
-          ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname)$(DLL_SUFFIX).$(MOZ_ICU_VERSION))
-        endif
-      endif # WINNT
-      ifdef ICU_FILES
-        ICU_DEST := $(DIST)/bin
-        INSTALL_TARGETS += ICU
-        $(ICU_FILES): buildicu
-        ICU_TARGET := target
-      endif
-    else # !MOZ_SHARED_ICU
-      ifeq ($(OS_ARCH),WINNT)
-        ICU_LIB_RENAME = $(foreach libname,$(ICU_LIB_NAMES),\
-                             cp -p $(DEPTH)/intl/icu/target/lib/s$(libname)$(MOZ_ICU_DBG_SUFFIX).lib $(DEPTH)/intl/icu/target/lib/$(libname)$(MOZ_ICU_DBG_SUFFIX).lib;)
-      endif
-    endif # MOZ_SHARED_ICU
+    ifdef MOZ_ICU_DATA_ARCHIVE
+      ICU_FILES += $(DEPTH)/intl/icu/target/data/out/$(ICU_DATA_FILE)
+    endif
+    ifdef ICU_FILES
+      ICU_DEST := $(DIST)/bin
+      INSTALL_TARGETS += ICU
+      $(ICU_FILES): buildicu
+     ICU_TARGET := target
+    endif
   endif # !MOZ_SYSTEM_ICU
 endif # USE_ICU
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef USE_ICU
 ifndef MOZ_SYSTEM_ICU
 target:: buildicu
@@ -45,17 +30,16 @@ target:: buildicu
 buildicu::
 # ICU's build system is full of races, so force non-parallel build.
 # Msys screws up GENRBOPTS when it contains spaces, so all genrb flags need
 # to be stuck together. See https://bugzilla.mozilla.org/show_bug.cgi?id=1034594#c34
 ifdef CROSS_COMPILE
 	+ASAN_OPTIONS=detect_leaks=0 $(MAKE) -j1 -C $(DEPTH)/intl/icu/host STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-kRC'
 endif
 	+ASAN_OPTIONS=detect_leaks=0 $(MAKE) -j1 -C $(DEPTH)/intl/icu/target STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-kR'
-	$(ICU_LIB_RENAME)
 
 distclean clean::
 ifdef CROSS_COMPILE
 	+$(MAKE) -C $(DEPTH)/intl/icu/host $@ STATIC_O=$(OBJ_SUFFIX)
 endif
 	+$(MAKE) -C $(DEPTH)/intl/icu/target $@ STATIC_O=$(OBJ_SUFFIX)
 
 endif
--- a/config/external/icu/moz.build
+++ b/config/external/icu/moz.build
@@ -6,18 +6,17 @@
 
 Library('icu')
 
 if CONFIG['MOZ_SYSTEM_ICU']:
     OS_LIBS += CONFIG['MOZ_ICU_LIBS']
 else:
     # Order needs to be preserved
     for l in CONFIG['ICU_LIB_NAMES']:
-        USE_LIBS += ['%s/intl/icu/target/lib/%s%s' % (
-            'static:' if not CONFIG['MOZ_SHARED_ICU'] else '',
+        USE_LIBS += ['static:/intl/icu/target/lib/%s%s' % (
             l,
             CONFIG['MOZ_ICU_DBG_SUFFIX']
         )]
 
     if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
         OS_LIBS += [
             'gabi++',
         ]
--- a/config/moz.build
+++ b/config/moz.build
@@ -24,18 +24,18 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
         'nsinstall.c',
         'pathsub.c',
     ]
     # stdc++compat depends on config/export, so avoid a circular
     # dependency added by HostProgram depending on stdc++compat,
     # while the program here is in C.
     HostProgram('nsinstall_real', c_only=True)
 
-if CONFIG['MOZ_SHARED_ICU']:
-    DEFINES['MOZ_SHARED_ICU'] = True
+if CONFIG['MOZ_SYSTEM_ICU']:
+    DEFINES['MOZ_SYSTEM_ICU'] = True
 
 PYTHON_UNIT_TESTS += [
     'tests/test_mozbuild_reading.py',
     'tests/unit-expandlibs.py',
     'tests/unit-mozunit.py',
     'tests/unit-nsinstall.py',
     'tests/unit-printprereleasesuffix.py',
 ]
--- a/config/system-headers
+++ b/config/system-headers
@@ -1322,17 +1322,17 @@ gst/video/video.h
 sys/msg.h
 sys/ipc.h
 sys/thr.h
 sys/user.h
 kvm.h
 spawn.h
 err.h
 xlocale.h
-#ifdef MOZ_SHARED_ICU
+#ifdef MOZ_SYSTEM_ICU
 unicode/locid.h
 unicode/numsys.h
 unicode/timezone.h
 unicode/ucal.h
 unicode/uchar.h
 unicode/uclean.h
 unicode/ucol.h
 unicode/udat.h
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -82,39 +82,16 @@ ifdef MSVC_CXX_RUNTIME_DLL
   JSSHELL_BINS += $(MSVC_CXX_RUNTIME_DLL)
 endif
 
 ifdef WIN_UCRT_REDIST_DIR
   JSSHELL_BINS += $(notdir $(wildcard $(DIST)/bin/api-ms-win-*.dll))
   JSSHELL_BINS += ucrtbase.dll
 endif
 
-ifdef MOZ_SHARED_ICU
-ifeq ($(OS_TARGET), WINNT)
-JSSHELL_BINS += \
-  icudt$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
-  icuin$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
-  icuuc$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
-  $(NULL)
-else
-ifeq ($(OS_TARGET), Darwin)
-JSSHELL_BINS += \
-  libicudata.$(MOZ_ICU_VERSION).dylib \
-  libicui18n.$(MOZ_ICU_VERSION).dylib \
-  libicuuc.$(MOZ_ICU_VERSION).dylib \
-  $(NULL)
-else
-JSSHELL_BINS += \
-  libicudata.so.$(MOZ_ICU_VERSION) \
-  libicui18n.so.$(MOZ_ICU_VERSION) \
-  libicuuc.so.$(MOZ_ICU_VERSION) \
-  $(NULL)
-endif # Darwin
-endif # WINNT
-endif # MOZ_STATIC_JS
 MAKE_JSSHELL  = $(call py_action,zip,-C $(DIST)/bin $(abspath $(PKG_JSSHELL)) $(JSSHELL_BINS))
 
 JARLOG_DIR = $(topobjdir)/jarlog/
 JARLOG_FILE_AB_CD = $(JARLOG_DIR)/$(AB_CD).log
 
 TAR_CREATE_FLAGS := --exclude=.mkdir.done $(TAR_CREATE_FLAGS)
 CREATE_FINAL_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \
   --mode=go-w --exclude=.mkdir.done -f