Bug 915735 - Build ICU as a shared library where JS is built as a shared library; r=glandium

This commit is contained in:
Ehsan Akhgari 2013-12-06 08:08:52 -05:00
Родитель a937b2c32a
Коммит 8c254a9883
21 изменённых файлов: 362 добавлений и 59 удалений

Просмотреть файл

@ -18,4 +18,4 @@
# Modifying this file will now automatically clobber the buildbot machines \o/
#
Bug 947080 - bug 937317 required clobber on windows
Bug 915735 requires clobber

1
aclocal.m4 поставляемый
Просмотреть файл

@ -30,6 +30,7 @@ builtin(include, build/autoconf/zlib.m4)dnl
builtin(include, build/autoconf/linux.m4)dnl
builtin(include, build/autoconf/python-virtualenv.m4)dnl
builtin(include, build/autoconf/winsdk.m4)dnl
builtin(include, build/autoconf/icu.m4)dnl
MOZ_PROG_CHECKMSYS()

Просмотреть файл

@ -111,6 +111,11 @@ BINPATH = bin
endif
DEFINES += -DBINPATH=$(BINPATH)
DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION)
ifdef MOZ_SHARED_ICU
DEFINES += -DMOZ_SHARED_ICU
endif
libs::
$(MAKE) -C $(DEPTH)/browser/locales langpack

Просмотреть файл

@ -101,6 +101,27 @@
#endif
#endif
#endif
#ifdef MOZ_SHARED_ICU
#ifdef XP_WIN
#ifdef MOZ_DEBUG
@BINPATH@/icudtd@MOZ_ICU_VERSION@.dll
@BINPATH@/icuind@MOZ_ICU_VERSION@.dll
@BINPATH@/icuucd@MOZ_ICU_VERSION@.dll
#else
@BINPATH@/icudt@MOZ_ICU_VERSION@.dll
@BINPATH@/icuin@MOZ_ICU_VERSION@.dll
@BINPATH@/icuuc@MOZ_ICU_VERSION@.dll
#endif
#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
[browser]
; [Base Browser Files]

31
build/autoconf/icu.m4 Normal file
Просмотреть файл

@ -0,0 +1,31 @@
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.
AC_DEFUN([MOZ_CONFIG_ICU], [
icudir="$_topsrcdir/intl/icu/source"
if test ! -d "$icudir"; then
icudir="$_topsrcdir/../../intl/icu/source"
if test ! -d "$icudir"; then
AC_MSG_ERROR([Cannot find the ICU directory])
fi
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
MOZ_SHARED_ICU=1
fi
AC_SUBST(MOZ_ICU_VERSION)
AC_SUBST(MOZ_SHARED_ICU)
])

Просмотреть файл

@ -27,3 +27,6 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
DEFINES['GKMEDIAS_SHARED_LIBRARY'] = True
if CONFIG['MOZ_SHARED_ICU']:
DEFINES['MOZ_SHARED_ICU'] = True

Просмотреть файл

@ -1131,7 +1131,7 @@ kvm.h
spawn.h
err.h
xlocale.h
#if MOZ_NATIVE_ICU==1
#ifdef MOZ_SHARED_ICU
unicode/locid.h
unicode/numsys.h
unicode/ucal.h

Просмотреть файл

@ -3896,6 +3896,17 @@ if test -n "$MOZ_NATIVE_FFI"; then
MOZ_JS_STATIC_LIBS="$MOZ_JS_STATIC_LIBS $MOZ_FFI_LIBS"
fi
# split JS out by default to avoid VS2005 PGO crash (bug 591836).
if test "$OS_ARCH" = "WINNT"; then
JS_SHARED_LIBRARY=1
fi
MOZ_ARG_ENABLE_BOOL(shared-js,
[ --enable-shared-js
Create a shared JavaScript library.],
JS_SHARED_LIBRARY=1,
JS_SHARED_LIBRARY=)
dnl ========================================================
dnl System ICU Support
dnl ========================================================
@ -7726,19 +7737,7 @@ dnl =
dnl ========================================================
MOZ_ARG_HEADER(Static build options)
# split JS out by default to avoid VS2005 PGO crash (bug 591836).
if test "$OS_ARCH" = "WINNT"; then
ENABLE_SHARED_JS=1
fi
MOZ_ARG_ENABLE_BOOL(shared-js,
[ --enable-shared-js
Create a shared JavaScript library.],
ENABLE_SHARED_JS=1,
ENABLE_SHARED_JS=)
if test -n "$ENABLE_SHARED_JS"; then
JS_SHARED_LIBRARY=1
if test -n "$JS_SHARED_LIBRARY"; then
MOZ_JS_LIBS="$MOZ_JS_SHARED_LIBS"
else
MOZ_JS_LIBS="$MOZ_JS_STATIC_LIBS"
@ -8787,6 +8786,81 @@ HAVE_SYS_MOUNT_H
AC_SUBST(STLPORT_LIBS)
MOZ_ARG_WITH_STRING(intl-api,
[ --with-intl-api, --with-intl-api=build, --without-intl-api
Determine the status of the ECMAScript Internationalization API. The first
(or lack of any of these) builds and exposes the API. The second builds it
but doesn't use ICU or expose the API to script. The third doesn't build
ICU at all.],
_INTL_API=$withval,
_INTL_API=yes)
WITH_INTL="--with-intl-api=$_INTL_API"
ENABLE_INTL_API=
case "$_INTL_API" in
no)
;;
build)
ENABLE_INTL_API=1
;;
yes)
ENABLE_INTL_API=1
;;
*)
AC_MSG_ERROR([Invalid value passed to --with-intl-api: $_INTL_API])
;;
esac
if test -n "$ENABLE_INTL_API"; then
if test "$MOZ_BUILD_APP" = "browser"; then
WITH_INTL="--with-intl-api"
else
# Internationalization isn't built or exposed by default in non-desktop
# builds. Bugs to enable:
#
# Android: bug 864843
# B2G: bug 866301
WITH_INTL="--without-intl-api"
ENABLE_INTL_API=
fi
fi
dnl Settings for the implementation of the ECMAScript Internationalization API
if test -n "$ENABLE_INTL_API"; then
AC_DEFINE(ENABLE_INTL_API)
MOZ_CONFIG_ICU()
dnl Build ICU as a shared library for shared js builds.
if test -z "$MOZ_NATIVE_ICU" -a -n "$JS_SHARED_LIBRARY"; then
case "$OS_TARGET" in
WINNT)
ICU_LIB_NAMES="icuin icuuc icudt"
DBG_SUFFIX=
if test -n "$MOZ_DEBUG"; then
DBG_SUFFIX=d
fi
MOZ_ICU_LIBS='$(foreach lib,$(ICU_LIB_NAMES),$(DEPTH)/js/src/intl/icu/target/lib/$(LIB_PREFIX)$(lib)$(DBG_SUFFIX).$(LIB_SUFFIX))'
;;
Darwin)
ICU_LIB_NAMES="icui18n icuuc icudata"
MOZ_ICU_LIBS='$(foreach lib,$(ICU_LIB_NAMES),$(DEPTH)/js/src/intl/icu/target/lib/$(DLL_PREFIX)$(lib).$(MOZ_ICU_VERSION)$(DLL_SUFFIX))'
;;
Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
ICU_LIB_NAMES="icui18n icuuc icudata"
MOZ_ICU_LIBS='$(foreach lib,$(ICU_LIB_NAMES),$(DEPTH)/js/src/intl/icu/target/lib/$(DLL_PREFIX)$(lib)$(DLL_SUFFIX).$(MOZ_ICU_VERSION))'
;;
*)
AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
esac
fi
fi
AC_SUBST(DBG_SUFFIX)
AC_SUBST(ENABLE_INTL_API)
AC_SUBST(ICU_LIB_NAMES)
AC_SUBST(MOZ_ICU_LIBS)
export WRITE_MOZINFO=1
AC_OUTPUT()
unset WRITE_MOZINFO
@ -9160,26 +9234,6 @@ dist=$MOZ_BUILD_ROOT/dist
ac_configure_args="$_SUBDIR_CONFIG_ARGS"
ac_configure_args="$ac_configure_args --enable-threadsafe"
MOZ_ARG_WITH_STRING(intl-api,
[ --with-intl-api, --with-intl-api=build, --without-intl-api
Determine the status of the ECMAScript Internationalization API. The first
(or lack of any of these) builds and exposes the API. The second builds it
but doesn't use ICU or expose the API to script. The third doesn't build
ICU at all.],
WITH_INTL="--with-intl-api=$withval"
)
if test -z "$WITH_INTL"; then
if test "$MOZ_BUILD_APP" = "browser"; then
WITH_INTL="--with-intl-api"
else
# Internationalization isn't built or exposed by default in non-desktop
# builds. Bugs to enable:
#
# Android: bug 864843
# B2G: bug 866301
WITH_INTL="--without-intl-api"
fi
fi
ac_configure_args="$ac_configure_args $WITH_INTL"
if test "$BUILD_CTYPES"; then

Просмотреть файл

@ -0,0 +1,29 @@
Bug 915735 - Fix linking the ICU libraries on Mac
diff --git a/intl/icu/source/config/mh-darwin b/intl/icu/source/config/mh-darwin
index 97d6bfc..fe1490e 100644
--- a/intl/icu/source/config/mh-darwin
+++ b/intl/icu/source/config/mh-darwin
@@ -23,21 +23,17 @@ ARFLAGS += -c
COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -fno-common -c
COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -fno-common -c
## Commands to make a shared library
SHLIB.c= $(CC) -dynamiclib -dynamic $(CFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
## Compiler switches to embed a library name and version information
-ifeq ($(ENABLE_RPATH),YES)
-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET))
-else
-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))
-endif
+LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/$(notdir $(MIDDLE_SO_TARGET))
## Compiler switch to embed a runtime search path
LD_RPATH=
LD_RPATH_PRE= -Wl,-rpath,
## Environment variable to set a runtime search path
LDLIBRARYPATH_ENVVAR = DYLD_LIBRARY_PATH

Просмотреть файл

@ -28,11 +28,7 @@ SHLIB.c= $(CC) -dynamiclib -dynamic $(CFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
## Compiler switches to embed a library name and version information
ifeq ($(ENABLE_RPATH),YES)
LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET))
else
LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))
endif
LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/$(notdir $(MIDDLE_SO_TARGET))
## Compiler switch to embed a runtime search path
LD_RPATH=

Просмотреть файл

@ -119,6 +119,44 @@ jsconfig_FILES = $(export_files)
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
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)
else
ICU_LIB_RENAME = $(foreach libname,$(ICU_LIB_NAMES),\
cp -p intl/icu/target/lib/s$(libname)$(ICU_LIB_SUFFIX).lib intl/icu/target/lib/$(libname).lib;)
endif
else
ifeq ($(OS_ARCH),Darwin)
ifdef JS_SHARED_LIBRARY
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),intl/icu/target/lib/$(DLL_PREFIX)$(libname).$(MOZ_ICU_VERSION)$(DLL_SUFFIX))
endif
else
ifdef JS_SHARED_LIBRARY
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),intl/icu/target/lib/$(DLL_PREFIX)$(libname)$(DLL_SUFFIX).$(MOZ_ICU_VERSION))
endif
endif
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
include $(topsrcdir)/config/rules.mk
.PHONY: buildffi buildicu
@ -155,14 +193,21 @@ endif
ifdef ENABLE_INTL_API
ifndef MOZ_NATIVE_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
ICU_LIB_RENAME = $(foreach libname,$(ICU_LIB_NAMES),\
cp -p intl/icu/target/lib/s$(libname)$(ICU_LIB_SUFFIX).lib intl/icu/target/lib/$(libname).lib;)
ifdef _MSC_VER
OS_LIBS += $(call EXPAND_LIBNAME,delayimp)
ifdef MOZ_DEBUG
EXTRA_DSO_LDOPTS += \
-DELAYLOAD:icudtd$(MOZ_ICU_VERSION).dll \
-DELAYLOAD:icuind$(MOZ_ICU_VERSION).dll \
-DELAYLOAD:icuucd$(MOZ_ICU_VERSION).dll \
$(NULL)
else
EXTRA_DSO_LDOPTS += \
-DELAYLOAD:icudt$(MOZ_ICU_VERSION).dll \
-DELAYLOAD:icuin$(MOZ_ICU_VERSION).dll \
-DELAYLOAD:icuuc$(MOZ_ICU_VERSION).dll \
$(NULL)
endif
endif
ifdef .PYMAKE
@ -323,7 +368,7 @@ ifneq (,$(MOZ_ZLIB_LIBS)$(MOZ_GLUE_LDFLAGS))
DEFINES += -DUSE_ZLIB
endif
ifdef MOZ_NATIVE_ICU
ifdef MOZ_SHARED_ICU
EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS)
else
SHARED_LIBRARY_LIBS += $(MOZ_ICU_LIBS)

1
js/src/aclocal.m4 поставляемый
Просмотреть файл

@ -29,5 +29,6 @@ builtin(include, build/autoconf/zlib.m4)dnl
builtin(include, build/autoconf/linux.m4)dnl
builtin(include, build/autoconf/python-virtualenv.m4)dnl
builtin(include, build/autoconf/winsdk.m4)dnl
builtin(include, build/autoconf/icu.m4)dnl
MOZ_PROG_CHECKMSYS()

Просмотреть файл

@ -0,0 +1,31 @@
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.
AC_DEFUN([MOZ_CONFIG_ICU], [
icudir="$_topsrcdir/intl/icu/source"
if test ! -d "$icudir"; then
icudir="$_topsrcdir/../../intl/icu/source"
if test ! -d "$icudir"; then
AC_MSG_ERROR([Cannot find the ICU directory])
fi
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
MOZ_SHARED_ICU=1
fi
AC_SUBST(MOZ_ICU_VERSION)
AC_SUBST(MOZ_SHARED_ICU)
])

Просмотреть файл

@ -24,3 +24,6 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
# Force wrap zlib system header if building js as a shared library.
if CONFIG['JS_SHARED_LIBRARY'] or CONFIG['MOZ_NATIVE_ZLIB']:
DEFINES['MOZ_NATIVE_ZLIB'] = 1
if CONFIG['MOZ_SHARED_ICU']:
DEFINES['MOZ_SHARED_ICU'] = True

Просмотреть файл

@ -1131,7 +1131,7 @@ kvm.h
spawn.h
err.h
xlocale.h
#if MOZ_NATIVE_ICU==1
#ifdef MOZ_SHARED_ICU
unicode/locid.h
unicode/numsys.h
unicode/ucal.h

Просмотреть файл

@ -4207,21 +4207,42 @@ dnl Settings for the implementation of the ECMAScript Internationalization API
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
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|Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
Darwin)
ICU_LIB_NAMES="icui18n icuuc icudata"
if test "$DISABLE_SHARED_JS" != "1"; 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
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
MOZ_ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib)'
if test "$DISABLE_SHARED_JS" = "1"; 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)
@ -4229,8 +4250,12 @@ 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.
AC_DEFINE(U_STATIC_IMPLEMENTATION)
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
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.
@ -4322,8 +4347,12 @@ if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then
ICU_TARGET_OPT="--build=$target --host=$target"
fi
# To reduce library size, use static linking
ICU_LINK_OPTS="--enable-static --disable-shared"
if test "$DISABLE_SHARED_JS" = "1"; 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"

Просмотреть файл

@ -8,7 +8,7 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIB
LOCAL_INCLUDES += -I$(topsrcdir) -I..
ifdef MOZ_NATIVE_ICU
ifdef MOZ_SHARED_ICU
EXTRA_LIBS += $(MOZ_ICU_LIBS)
endif

Просмотреть файл

@ -8,7 +8,7 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLI
LOCAL_INCLUDES += -I$(topsrcdir) -I..
ifdef MOZ_NATIVE_ICU
ifdef MOZ_SHARED_ICU
EXTRA_LIBS += $(MOZ_ICU_LIBS)
endif

Просмотреть файл

@ -15,7 +15,7 @@ LIBS = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_
ifdef MOZ_NATIVE_FFI
EXTRA_LIBS += $(MOZ_FFI_LIBS)
endif
ifdef MOZ_NATIVE_ICU
ifdef MOZ_SHARED_ICU
EXTRA_LIBS += $(MOZ_ICU_LIBS)
endif

Просмотреть файл

@ -127,6 +127,27 @@ EXTRA_DSO_LDOPTS += \
$(SQLITE_LIBS) \
$(NULL)
ifdef ENABLE_INTL_API
ifdef JS_SHARED_LIBRARY
EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS)
ifdef _MSC_VER
ifdef MOZ_DEBUG
EXTRA_DSO_LDOPTS += \
-DELAYLOAD:icudtd$(MOZ_ICU_VERSION).dll \
-DELAYLOAD:icuind$(MOZ_ICU_VERSION).dll \
-DELAYLOAD:icuucd$(MOZ_ICU_VERSION).dll \
$(NULL)
else
EXTRA_DSO_LDOPTS += \
-DELAYLOAD:icudt$(MOZ_ICU_VERSION).dll \
-DELAYLOAD:icuin$(MOZ_ICU_VERSION).dll \
-DELAYLOAD:icuuc$(MOZ_ICU_VERSION).dll \
$(NULL)
endif
endif
endif
endif
ifdef MOZ_NATIVE_JPEG
EXTRA_DSO_LDOPTS += $(MOZ_JPEG_LIBS)
endif

Просмотреть файл

@ -102,6 +102,39 @@ JSSHELL_BINS += \
$(NULL)
endif # MOZ_FOLD_LIBS
endif # MOZ_NATIVE_NSPR
ifdef MOZ_SHARED_ICU
ifdef XP_WIN
ifdef MOZ_DEBUG
JSSHELL_BINS += \
$(DIST)/bin/icudtd$(MOZ_ICU_VERSION).dll \
$(DIST)/bin/icuind$(MOZ_ICU_VERSION).dll \
$(DIST)/bin/icuucd$(MOZ_ICU_VERSION).dll \
$(NULL)
else
JSSHELL_BINS += \
$(DIST)/bin/icudt$(MOZ_ICU_VERSION).dll \
$(DIST)/bin/icuin$(MOZ_ICU_VERSION).dll \
$(DIST)/bin/icuuc$(MOZ_ICU_VERSION).dll \
$(NULL)
endif # MOZ_DEBUG
else
ifdef XP_MACOSX
JSSHELL_BINS += \
$(DIST)/bin/libicudata.$(MOZ_ICU_VERSION).dylib \
$(DIST)/bin/libicui18n.$(MOZ_ICU_VERSION).dylib \
$(DIST)/bin/libicuuc.$(MOZ_ICU_VERSION).dylib \
$(NULL)
else
ifdef XP_UNIX
JSSHELL_BINS += \
$(DIST)/bin/libicudata.so.$(MOZ_ICU_VERSION) \
$(DIST)/bin/libicui18n.so.$(MOZ_ICU_VERSION) \
$(DIST)/bin/libicuuc.so.$(MOZ_ICU_VERSION) \
$(NULL)
endif # XP_UNIX
endif # XP_MACOSX
endif # XP_WIN
endif # MOZ_STATIC_JS
MAKE_JSSHELL = $(ZIP) -9j $(PKG_JSSHELL) $(JSSHELL_BINS)
endif # LIBXUL_SDK