include('../defs.mozbuild')
include('sources.mozbuild')
+
+SOURCES += sources
+
+if CONFIG['TARGET_ENDIANNESS'] == 'big':
+ HostLibrary('host_icuuc')
+ HOST_DEFINES['U_COMMON_IMPLEMENTATION'] = True
+ HOST_SOURCES += sources
+ HOST_SOURCES += [
+ '/intl/icu/source/common/cstr.cpp',
+ '/intl/icu/source/common/ucnv2022.cpp',
+ '/intl/icu/source/common/ucnv_ct.cpp',
+ '/intl/icu/source/common/ucnv_ext.cpp',
+ '/intl/icu/source/common/ucnv_lmb.cpp',
+ '/intl/icu/source/common/ucnvdisp.cpp',
+ '/intl/icu/source/common/ucnvhz.cpp',
+ '/intl/icu/source/common/ucnvisci.cpp',
+ '/intl/icu/source/common/ucnvmbcs.cpp',
+ ]
# THIS FILE IS GENERATED BY /intl/icu_sources_data.py DO NOT EDIT
-SOURCES += [
+sources = [
'/intl/icu/source/common/appendable.cpp',
'/intl/icu/source/common/bmpset.cpp',
'/intl/icu/source/common/brkeng.cpp',
--- /dev/null
+# 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/.
+
+import os
+import subprocess
+import buildconfig
+
+
+def main(output, data_file):
+ output.close()
+ subprocess.run([
+ os.path.join(buildconfig.topobjdir, 'dist', 'host', 'bin', 'icupkg'),
+ '-tb',
+ data_file,
+ output.name,
+ ])
LOCAL_INCLUDES += ['.']
-DEFINES['ICU_DATA_FILE'] = '"icudt%sl.dat"' % CONFIG['MOZ_ICU_VERSION']
+data_file = {
+ 'little': 'icudt%sl.dat' % CONFIG['MOZ_ICU_VERSION'],
+ 'big': 'icudt%sb.dat' % CONFIG['MOZ_ICU_VERSION'],
+}
+DEFINES['ICU_DATA_FILE'] = '"%s"' % data_file[CONFIG['TARGET_ENDIANNESS']]
DEFINES['ICU_DATA_SYMBOL'] = 'icudt%s_dat' % CONFIG['MOZ_ICU_VERSION']
SOURCES += [
'icudata.c',
]
+
+if CONFIG['TARGET_ENDIANNESS'] == 'big':
+ HostLibrary('host_icudata')
+ HOST_DEFINES['ICU_DATA_FILE'] = '"%s"' % data_file['little']
+ HOST_DEFINES['ICU_DATA_SYMBOL'] = DEFINES['ICU_DATA_SYMBOL']
+ HOST_SOURCES += [
+ 'icudata.c',
+ ]
+ GeneratedFile(data_file['big'],
+ script='convert_icudata.py',
+ inputs=[data_file['little']])
DEFINES['UNISTR_FROM_CHAR_EXPLICIT'] = "explicit"
DEFINES['UNISTR_FROM_STRING_EXPLICIT'] = "explicit"
+DEFINES['U_ENABLE_DYLOAD'] = 0
+
if not CONFIG['HAVE_LANGINFO_CODESET']:
DEFINES['U_HAVE_NL_LANGINFO_CODESET'] = 0
'-Wno-macro-redefined',
'-Wno-microsoft-include',
]
+
+for k, v in DEFINES.items():
+ if k != 'UCONFIG_NO_LEGACY_CONVERSION':
+ HOST_DEFINES[k] = v
include('../defs.mozbuild')
include('sources.mozbuild')
+
+SOURCES += sources
+
+if CONFIG['TARGET_ENDIANNESS'] == 'big':
+ HostLibrary('host_icui18n')
+ HOST_DEFINES['U_I18N_IMPLEMENTATION'] = True
+ HOST_SOURCES += sources
+ HOST_SOURCES += ['/intl/icu/source/i18n/ulocdata.cpp']
# THIS FILE IS GENERATED BY /intl/icu_sources_data.py DO NOT EDIT
-SOURCES += [
+sources = [
'/intl/icu/source/i18n/astro.cpp',
'/intl/icu/source/i18n/basictz.cpp',
'/intl/icu/source/i18n/bocsu.cpp',
--- /dev/null
+# -*- 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/.
+
+HostProgram('icupkg')
+
+LOCAL_INCLUDES += [
+ '/intl/icu/source/common',
+ '/intl/icu/source/i18n',
+ '/intl/icu/source/tools/toolutil',
+]
+
+include('../defs.mozbuild')
+include('sources.mozbuild')
+
+HOST_SOURCES += sources
+
+HOST_USE_LIBS += [
+ 'host_icudata',
+ 'host_icui18n',
+ 'host_icutoolutil',
+ 'host_icuuc',
+]
--- /dev/null
+# THIS FILE IS GENERATED BY /intl/icu_sources_data.py DO NOT EDIT
+sources = [
+ '/intl/icu/source/tools/icupkg/icupkg.cpp',
+]
+
'data',
'i18n',
]
+ if CONFIG['TARGET_ENDIANNESS'] == 'big':
+ DIRS += [
+ 'toolutil',
+ 'icupkg',
+ ]
USE_LIBS += ['icudata']
--- /dev/null
+# -*- 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/.
+
+HostLibrary('host_icutoolutil')
+FINAL_LIBRARY = 'icu'
+
+DEFINES['U_TOOLUTIL_IMPLEMENTATION'] = True
+
+LOCAL_INCLUDES += [
+ '/intl/icu/source/common',
+ '/intl/icu/source/i18n',
+]
+
+include('../defs.mozbuild')
+include('sources.mozbuild')
+
+HOST_SOURCES += sources
--- /dev/null
+# THIS FILE IS GENERATED BY /intl/icu_sources_data.py DO NOT EDIT
+sources = [
+ '/intl/icu/source/tools/toolutil/collationinfo.cpp',
+ '/intl/icu/source/tools/toolutil/dbgutil.cpp',
+ '/intl/icu/source/tools/toolutil/denseranges.cpp',
+ '/intl/icu/source/tools/toolutil/filestrm.cpp',
+ '/intl/icu/source/tools/toolutil/filetools.cpp',
+ '/intl/icu/source/tools/toolutil/flagparser.cpp',
+ '/intl/icu/source/tools/toolutil/package.cpp',
+ '/intl/icu/source/tools/toolutil/pkg_genc.cpp',
+ '/intl/icu/source/tools/toolutil/pkg_gencmn.cpp',
+ '/intl/icu/source/tools/toolutil/pkg_icu.cpp',
+ '/intl/icu/source/tools/toolutil/pkgitems.cpp',
+ '/intl/icu/source/tools/toolutil/ppucd.cpp',
+ '/intl/icu/source/tools/toolutil/swapimpl.cpp',
+ '/intl/icu/source/tools/toolutil/toolutil.cpp',
+ '/intl/icu/source/tools/toolutil/ucbuf.cpp',
+ '/intl/icu/source/tools/toolutil/ucln_tu.cpp',
+ '/intl/icu/source/tools/toolutil/ucm.cpp',
+ '/intl/icu/source/tools/toolutil/ucmstate.cpp',
+ '/intl/icu/source/tools/toolutil/udbgutil.cpp',
+ '/intl/icu/source/tools/toolutil/unewdata.cpp',
+ '/intl/icu/source/tools/toolutil/uoptions.cpp',
+ '/intl/icu/source/tools/toolutil/uparse.cpp',
+ '/intl/icu/source/tools/toolutil/writesrc.cpp',
+ '/intl/icu/source/tools/toolutil/xmlparser.cpp',
+]
+
# currently have a good way of expressing this dependency.
toolkit/components/updateagent/target: toolkit/mozapps/update/common/target
+ifeq ($(TARGET_ENDIANNESS),big)
+config/external/icu/data/target-objects: config/external/icu/data/icudt$(MOZ_ICU_VERSION)b.dat
+config/external/icu/data/icudt$(MOZ_ICU_VERSION)b.dat: config/external/icu/icupkg/host
+ $(MAKE) -C $(@D) $(@F)
+endif
+
ifdef ENABLE_CLANG_PLUGIN
# Only target rules use the clang plugin.
$(filter %/target %/target-objects,$(filter-out config/export config/host build/unix/stdc++compat/% build/clang-plugin/%,$(compile_targets))): build/clang-plugin/host build/clang-plugin/tests/target-objects
with open(mozbuild, 'wb') as f:
f.write('# THIS FILE IS GENERATED BY /intl/icu_sources_data.py ' +
'DO NOT EDIT\n' +
- 'SOURCES += [\n')
+ 'sources = [\n')
f.write(''.join(" '/%s',\n" % s for s in sources))
f.write(']\n\n')
- f.write('EXPORTS.unicode += [\n')
- f.write(''.join(" '/%s',\n" % s for s in headers))
- f.write(']\n')
+ if headers:
+ f.write('EXPORTS.unicode += [\n')
+ f.write(''.join(" '/%s',\n" % s for s in headers))
+ f.write(']\n')
def update_sources(topsrcdir):
print('Updating ICU sources lists...')
sys.path.append(mozpath.join(topsrcdir, 'build/pymake'))
- for d in ['common', 'i18n']:
+ for d in ['common', 'i18n', 'tools/toolutil', 'tools/icupkg']:
base_path = mozpath.join(topsrcdir, 'intl/icu/source/%s' % d)
makefile = mozpath.join(base_path, 'Makefile.in')
mozbuild = mozpath.join(topsrcdir,
- 'config/external/icu/%s/sources.mozbuild' % d)
+ 'config/external/icu/%s/sources.mozbuild' % mozpath.basename(d))
sources = [mozpath.relpath(s, topsrcdir)
for s in get_sources_from_makefile(makefile)]
sources = filter(lambda x: x not in UNUSED_SOURCES, sources)
- headers = [mozpath.normsep(os.path.relpath(s, topsrcdir))
- for s in list_headers(mozpath.join(base_path, 'unicode'))]
+ unicode = mozpath.join(base_path, 'unicode')
+ if os.path.exists(unicode):
+ headers = [mozpath.normsep(os.path.relpath(s, topsrcdir))
+ for s in list_headers(unicode)]
+ else:
+ headers = None
write_sources(mozbuild, sources, headers)