summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@aol.com>2023-03-19 00:08:48 +0800
committerJob Bautista <jobbautista9@aol.com>2023-03-19 00:16:46 +0800
commiteac34369607620a9c80e0472a627ae8a7ec095be (patch)
tree7aeeacf67346a912bc4cb3ef56d38cd8f5b63fb9 /config
parent972e0410ca7df3b66d1675c8ed10a2a547a4ecbf (diff)
downloaduxp-eac34369607620a9c80e0472a627ae8a7ec095be.tar.gz
Issue #2165 - Build ICU as a shared library if we're building Spidermonkey shared.
It seems that if we're going to enable JS_SHARED_LIBRARY, we need ICU to be a shared library too in order to prevent code duplication in mozjs.dll bloating it to a whopping 21 MB. This unfortunately means we have to fold icudata back to icu itself. But since icudata is still separated from libxul (which is what really matters for #1451), I think this is a fair compromise. Building ICU as shared is offered as an option via --enable-shared-icu. But technically you really need --enable-shared-icu if you're going to use --enable-shared-js. Unfortunately I can't make configure exit with an error if MOZ_SHARED_ICU is not defined when JS_SHARED_LIBRARY is enabled, because options are controlled by different configure scripts (icu is based on bash, while js is based on python), and I have no idea how to pass MOZ_SHARED_ICU to js's moz.configure. Tag #62
Diffstat (limited to 'config')
-rw-r--r--config/external/icu/moz.build5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/external/icu/moz.build b/config/external/icu/moz.build
index ba95cd0fb3..e403f17c78 100644
--- a/config/external/icu/moz.build
+++ b/config/external/icu/moz.build
@@ -3,8 +3,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/.
-Library('icu')
-
DIRS += [
'common',
'data',
@@ -14,5 +12,8 @@ DIRS += [
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']