Skip to content

Commit

Permalink
bug 1247396 - drop support for MOZ_SHARED_ICU. r=glandium
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: 54AQdzJqvvA

--HG--
extra : rebase_source : 55a702b7f134a7c760397f83b1fd1e6044404d7e
extra : amend_source : 1654150e6ebc2bd3a3ff162d486685871640c635
extra : histedit_source : a59866a9ccc244c415ffeb7c7fe685d00b25753d
  • Loading branch information
luser committed Feb 11, 2016
1 parent a4142bf commit 4aa24eb
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 120 deletions.
3 changes: 0 additions & 3 deletions b2g/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ 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)))
Expand Down
15 changes: 0 additions & 15 deletions b2g/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,6 @@
#endif
#endif
#ifndef MOZ_SYSTEM_ICU
#ifdef MOZ_SHARED_ICU
#ifdef XP_WIN
@BINPATH@/icudt@MOZ_ICU_DBG_SUFFIX@@[email protected]
@BINPATH@/icuin@MOZ_ICU_DBG_SUFFIX@@[email protected]
@BINPATH@/icuuc@MOZ_ICU_DBG_SUFFIX@@[email protected]
#elif defined(XP_MACOSX)
@BINPATH@/libicudata.@[email protected]
@BINPATH@/libicui18n.@[email protected]
@BINPATH@/libicuuc.@[email protected]
#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@
Expand Down
3 changes: 0 additions & 3 deletions browser/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ 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
Expand Down
15 changes: 0 additions & 15 deletions browser/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,6 @@
#endif
#endif
#ifndef MOZ_SYSTEM_ICU
#ifdef MOZ_SHARED_ICU
#ifdef XP_WIN
@BINPATH@/icudt@MOZ_ICU_DBG_SUFFIX@@[email protected]
@BINPATH@/icuin@MOZ_ICU_DBG_SUFFIX@@[email protected]
@BINPATH@/icuuc@MOZ_ICU_DBG_SUFFIX@@[email protected]
#elif defined(XP_MACOSX)
@BINPATH@/libicudata.@[email protected]
@BINPATH@/libicui18n.@[email protected]
@BINPATH@/libicuuc.@[email protected]
#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@
Expand Down
43 changes: 12 additions & 31 deletions build/autoconf/icu.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ 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], [
Expand All @@ -18,7 +16,6 @@ MOZ_ARG_WITH_BOOL(system-icu,
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
Expand Down Expand Up @@ -79,21 +76,12 @@ if test -n "$USE_ICU"; then
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
Expand All @@ -114,10 +102,8 @@ 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)
Expand Down Expand Up @@ -198,12 +184,9 @@ if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then
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"
Expand Down Expand Up @@ -276,13 +259,11 @@ if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; 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"
Expand Down
34 changes: 9 additions & 25 deletions config/external/icu/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,15 @@
# 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

Expand All @@ -50,7 +35,6 @@ 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
Expand Down
3 changes: 1 addition & 2 deletions config/external/icu/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ if CONFIG['MOZ_SYSTEM_ICU']:
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']
)]
Expand Down
4 changes: 2 additions & 2 deletions config/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
# 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',
Expand Down
2 changes: 1 addition & 1 deletion config/system-headers
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ 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
Expand Down
23 changes: 0 additions & 23 deletions toolkit/mozapps/installer/upload-files.mk
Original file line number Diff line number Diff line change
Expand Up @@ -87,29 +87,6 @@ ifdef WIN_UCRT_REDIST_DIR
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/
Expand Down

0 comments on commit 4aa24eb

Please sign in to comment.