summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@aol.com>2023-03-24 17:45:16 +0800
committerJob Bautista <jobbautista9@aol.com>2023-03-24 17:45:16 +0800
commitee870812ffeac2731af182d8388367635e84242d (patch)
tree7aeeacf67346a912bc4cb3ef56d38cd8f5b63fb9 /config
parent0c63f5a27346875dd04c8bb41eced35203d20567 (diff)
downloaduxp-ee870812ffeac2731af182d8388367635e84242d.tar.gz
Revert "Issue #2165 - Follow-up: No longer support bundling the ICU data file into packaging, fold it into the ICU shared library, and always build ICU shared."
This reverts commit 0c63f5a27346875dd04c8bb41eced35203d20567. Building shared ICU is currently broken in non-Windows, so we need the option for now.
Diffstat (limited to 'config')
-rw-r--r--config/external/icu/data/moz.build9
-rw-r--r--config/external/icu/moz.build10
-rw-r--r--config/external/icu/stubdata/moz.build12
3 files changed, 26 insertions, 5 deletions
diff --git a/config/external/icu/data/moz.build b/config/external/icu/data/moz.build
index e41bf45c14..90b1fd7a19 100644
--- a/config/external/icu/data/moz.build
+++ b/config/external/icu/data/moz.build
@@ -3,10 +3,13 @@
# 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/.
-# Build a library containing the ICU data and fold it into the shared
-# ICU library.
+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')
-FINAL_LIBRARY = 'icu'
if CONFIG['OS_ARCH'] == 'WINNT':
if CONFIG['CPU_ARCH'] == 'x86':
diff --git a/config/external/icu/moz.build b/config/external/icu/moz.build
index 79c879f219..e403f17c78 100644
--- a/config/external/icu/moz.build
+++ b/config/external/icu/moz.build
@@ -9,5 +9,11 @@ DIRS += [
'i18n',
]
-SharedLibrary('icu')
-SHARED_LIBRARY_NAME = 'icu' + CONFIG['MOZ_ICU_VERSION']
+if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
+ DIRS += ['stubdata']
+ USE_LIBS += ['icustubdata']
+ Library('icu')
+else:
+ USE_LIBS += ['icudata']
+ SharedLibrary('icu')
+ SHARED_LIBRARY_NAME = 'icu' + CONFIG['MOZ_ICU_VERSION']
diff --git a/config/external/icu/stubdata/moz.build b/config/external/icu/stubdata/moz.build
new file mode 100644
index 0000000000..84c7f082d9
--- /dev/null
+++ b/config/external/icu/stubdata/moz.build
@@ -0,0 +1,12 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# 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']