mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1447475 - Rip out support code for setting MOZ_ICU_DATA_ARCHIVE and shipping ICU data in a file outside the binary. r=ted
--HG-- extra : rebase_source : 95ab9cd884297ed36b419d872110cee9be887bff
This commit is contained in:
parent
17af29c638
commit
5ad04f03a4
2
CLOBBER
2
CLOBBER
@ -22,4 +22,4 @@
|
||||
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
||||
# don't change CLOBBER for WebIDL changes any more.
|
||||
|
||||
Historically updating ICU has required a CLOBBER. Bug 1445524 is a fairly notable ICU-related change, so play it safe and force a full rebuild, even if no problem along these lines has actually been observed.
|
||||
More ICU-build-related touching for bug 1447475, trying a CLOBBER after a previous build failure just in case.
|
||||
|
@ -132,15 +132,9 @@ 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_ICU_DATA_ARCHIVE
|
||||
DEFINES += -DMOZ_ICU_DATA_ARCHIVE
|
||||
endif
|
||||
DEFINES += -DMOZ_ICU_DBG_SUFFIX=$(MOZ_ICU_DBG_SUFFIX)
|
||||
DEFINES += -DICU_DATA_FILE=$(ICU_DATA_FILE)
|
||||
ifdef CLANG_CXX
|
||||
DEFINES += -DCLANG_CXX
|
||||
endif
|
||||
|
@ -97,9 +97,6 @@
|
||||
@BINPATH@/ucrtbase.dll
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MOZ_ICU_DATA_ARCHIVE
|
||||
@RESPATH@/@ICU_DATA_FILE@
|
||||
#endif
|
||||
#ifdef MOZ_GTK3
|
||||
@BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
|
||||
@BINPATH@/gtk2/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
|
||||
|
@ -7,7 +7,6 @@ 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
|
||||
@ -79,15 +78,12 @@ if test -n "$USE_ICU"; then
|
||||
# We could make this set as 'l' or 'b' for little or big, respectively,
|
||||
# but we'd need to check in a big-endian version of the file.
|
||||
ICU_DATA_FILE="icudt${version}l.dat"
|
||||
|
||||
MOZ_ICU_DATA_ARCHIVE=
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_ICU_VERSION)
|
||||
AC_SUBST(ENABLE_INTL_API)
|
||||
AC_SUBST(USE_ICU)
|
||||
AC_SUBST(ICU_DATA_FILE)
|
||||
AC_SUBST(MOZ_ICU_DATA_ARCHIVE)
|
||||
|
||||
if test -n "$USE_ICU"; then
|
||||
dnl Source files that use ICU should have control over which parts of the ICU
|
||||
|
4
config/external/icu/data/moz.build
vendored
4
config/external/icu/data/moz.build
vendored
@ -4,10 +4,6 @@
|
||||
# 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/.
|
||||
|
||||
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
# Copy the pre-built ICU data file to dist/bin.
|
||||
FINAL_TARGET_FILES += [CONFIG['ICU_DATA_FILE']]
|
||||
|
||||
# Build a library containing the ICU data for use in the JS shell, so that
|
||||
# JSAPI consumers don't have to deal with setting ICU's data path.
|
||||
Library('icudata')
|
||||
|
6
config/external/icu/moz.build
vendored
6
config/external/icu/moz.build
vendored
@ -14,8 +14,4 @@ else:
|
||||
'data',
|
||||
'i18n',
|
||||
]
|
||||
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
DIRS += ['stubdata']
|
||||
USE_LIBS += ['icustubdata']
|
||||
else:
|
||||
USE_LIBS += ['icudata']
|
||||
USE_LIBS += ['icudata']
|
||||
|
13
config/external/icu/stubdata/moz.build
vendored
13
config/external/icu/stubdata/moz.build
vendored
@ -1,13 +0,0 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
# This builds the ICU stubdata library, since we are shipping ICU
|
||||
# data in a separate data file. ICU needs a data symbol to link against
|
||||
# even if you're loading its data from a file.
|
||||
|
||||
Library('icustubdata')
|
||||
|
||||
SOURCES += ['/intl/icu/source/stubdata/stubdata.cpp']
|
@ -30,17 +30,9 @@ FORCE_STATIC_LIB = True
|
||||
STATIC_LIBRARY_NAME = 'js_static'
|
||||
|
||||
if CONFIG['ENABLE_INTL_API']:
|
||||
if not CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
USE_LIBS += [
|
||||
'icu',
|
||||
]
|
||||
else:
|
||||
# Linking 'icu' will pull in the stubdata library,
|
||||
# which the shell doesn't want, so link the other bits.
|
||||
USE_LIBS += [
|
||||
'icui18n',
|
||||
'icuuc',
|
||||
]
|
||||
USE_LIBS += [
|
||||
'icu',
|
||||
]
|
||||
|
||||
USE_LIBS += [
|
||||
'nspr',
|
||||
|
@ -23,11 +23,6 @@ LOCAL_INCLUDES += [
|
||||
'..',
|
||||
]
|
||||
|
||||
if CONFIG['ENABLE_INTL_API'] and CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
# The ICU libraries linked into libmozjs will not include the ICU data,
|
||||
# so link it directly.
|
||||
USE_LIBS += ['icudata']
|
||||
|
||||
if CONFIG['FUZZING']:
|
||||
USE_LIBS += [
|
||||
'static:fuzzer-registry',
|
||||
|
@ -39,11 +39,6 @@ USE_LIBS += [
|
||||
'static:js',
|
||||
]
|
||||
|
||||
if CONFIG['ENABLE_INTL_API'] and CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
# The ICU libraries linked into libmozjs will not include the ICU data,
|
||||
# so link it directly.
|
||||
USE_LIBS += ['icudata']
|
||||
|
||||
OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
|
||||
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||
|
@ -163,11 +163,6 @@ LOCAL_INCLUDES += [
|
||||
'..',
|
||||
]
|
||||
|
||||
if CONFIG['ENABLE_INTL_API'] and CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
# The ICU libraries linked into libmozjs will not include the ICU data,
|
||||
# so link it directly.
|
||||
USE_LIBS += ['icudata']
|
||||
|
||||
USE_LIBS += [
|
||||
'static:js',
|
||||
]
|
||||
|
@ -37,11 +37,6 @@ LOCAL_INCLUDES += [
|
||||
OS_LIBS += CONFIG['EDITLINE_LIBS']
|
||||
OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
|
||||
|
||||
if CONFIG['ENABLE_INTL_API'] and CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
# The ICU libraries linked into libmozjs will not include the ICU data,
|
||||
# so link it directly.
|
||||
USE_LIBS += ['icudata']
|
||||
|
||||
# Prepare module loader JS code for embedding
|
||||
GENERATED_FILES += [('shellmoduleloader.out.h', 'shellmoduleloader.js')]
|
||||
shellmoduleloader = GENERATED_FILES[('shellmoduleloader.out.h', 'shellmoduleloader.js')]
|
||||
|
@ -155,10 +155,6 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**);
|
||||
|
||||
#include "gfxPlatform.h"
|
||||
|
||||
#if EXPOSE_INTL_API
|
||||
#include "unicode/putil.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using base::AtExitManager;
|
||||
using mozilla::ipc::BrowserProcessSubThread;
|
||||
@ -655,17 +651,6 @@ NS_InitXPCOM2(nsIServiceManager** aResult,
|
||||
memmove);
|
||||
#endif
|
||||
|
||||
#if EXPOSE_INTL_API && defined(MOZ_ICU_DATA_ARCHIVE)
|
||||
nsCOMPtr<nsIFile> greDir;
|
||||
nsDirectoryService::gService->Get(NS_GRE_DIR,
|
||||
NS_GET_IID(nsIFile),
|
||||
getter_AddRefs(greDir));
|
||||
MOZ_ASSERT(greDir);
|
||||
nsAutoCString nativeGREPath;
|
||||
greDir->GetNativePath(nativeGREPath);
|
||||
u_setDataDirectory(nativeGREPath.get());
|
||||
#endif
|
||||
|
||||
// Initialize the JS engine.
|
||||
const char* jsInitFailureReason = JS_InitWithFailureDiagnostic();
|
||||
if (jsInitFailureReason) {
|
||||
|
@ -83,8 +83,6 @@ FINAL_LIBRARY = 'xul'
|
||||
|
||||
DEFINES['_IMPL_NS_STRINGAPI'] = True
|
||||
DEFINES['OMNIJAR_NAME'] = CONFIG['OMNIJAR_NAME']
|
||||
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
|
||||
DEFINES['MOZ_ICU_DATA_ARCHIVE'] = True
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'!..',
|
||||
|
Loading…
Reference in New Issue
Block a user