Bug 947299 - Don't build ICU as a shared library when building JS in standalone mode; r=glandium

X-Git-Commit-ID: 4664ac89e5ef60181b1c783cced3c323d11d6e43

--HG--
extra : rebase_source : 9340c2e547459f1f001d7eae8eab61e8e29ec114
This commit is contained in:
Ehsan Akhgari 2013-12-06 21:07:02 -05:00
parent fec166b78a
commit 2886d7ae19
4 changed files with 10 additions and 8 deletions

View File

@ -22,7 +22,7 @@ AC_DEFUN([MOZ_CONFIG_ICU], [
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

View File

@ -125,6 +125,7 @@ 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.
@ -156,6 +157,7 @@ ifdef ICU_FILES
endif
endif
endif
endif
include $(topsrcdir)/config/rules.mk

View File

@ -22,7 +22,7 @@ AC_DEFUN([MOZ_CONFIG_ICU], [
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

View File

@ -4213,7 +4213,7 @@ if test -n "$ENABLE_INTL_API"; 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
@ -4223,20 +4223,20 @@ if test -n "$ENABLE_INTL_API"; then
;;
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
@ -4251,7 +4251,7 @@ 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)
@ -4347,7 +4347,7 @@ if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then
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