зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1480558 - part 4 - add icudata support for aarch64 windows; r=mshal
yasm doesn't support aarch64, and trying to use GNU as with an MSVC build seems like sadness waiting to happen. Instead, we'll generate our own assembly file that armasm64 will accept.
This commit is contained in:
Родитель
7661e89923
Коммит
93ba371b66
|
@ -91,9 +91,16 @@ if test -n "$USE_ICU"; then
|
|||
AC_DEFINE(U_USING_ICU_NAMESPACE,0)
|
||||
|
||||
if test -z "$MOZ_SYSTEM_ICU"; then
|
||||
if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then
|
||||
AC_MSG_ERROR([Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api])
|
||||
fi
|
||||
case "$OS_TARGET:$CPU_ARCH" in
|
||||
WINNT:aarch64)
|
||||
dnl we use non-yasm, non-GNU as solutions here.
|
||||
;;
|
||||
*)
|
||||
if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then
|
||||
AC_MSG_ERROR([Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
dnl We build ICU as a static library.
|
||||
AC_DEFINE(U_STATIC_IMPLEMENTATION)
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# -*- 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/.
|
||||
|
||||
|
||||
def main(output, data_file, data_symbol):
|
||||
output.write(''' AREA .rdata,ALIGN=4,DATA,READONLY
|
||||
EXPORT _{data_symbol}[DATA]
|
||||
_{data_symbol}
|
||||
INCBIN {data_file}
|
||||
END
|
||||
'''.format(data_file=data_file, data_symbol=data_symbol))
|
|
@ -14,14 +14,25 @@ if CONFIG['OS_ARCH'] == 'WINNT':
|
|||
elif CONFIG['OS_ARCH'] == 'Darwin':
|
||||
ASFLAGS += ['-DPREFIX']
|
||||
|
||||
ASFLAGS += [
|
||||
data_symbol = 'icudt%s_dat' % CONFIG['MOZ_ICU_VERSION']
|
||||
asflags = [
|
||||
'-DICU_DATA_FILE="%s"' % CONFIG['ICU_DATA_FILE'],
|
||||
'-DICU_DATA_SYMBOL=icudt%s_dat' % CONFIG['MOZ_ICU_VERSION'],
|
||||
'-DICU_DATA_SYMBOL=%s' % data_symbol,
|
||||
]
|
||||
LOCAL_INCLUDES += ['.']
|
||||
|
||||
if CONFIG['HAVE_YASM']:
|
||||
if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CPU_ARCH'] == 'aarch64':
|
||||
icudata = 'icudata.asm'
|
||||
GENERATED_FILES += [icudata]
|
||||
SOURCES += ['!%s' % icudata]
|
||||
icudata = GENERATED_FILES[icudata]
|
||||
icudata.script = 'genicudata.py'
|
||||
icudata.inputs = [CONFIG['ICU_DATA_FILE']]
|
||||
icudata.flags = [data_symbol]
|
||||
elif CONFIG['HAVE_YASM']:
|
||||
USE_YASM = True
|
||||
SOURCES += ['icudata.s']
|
||||
ASFLAGS += asflags
|
||||
elif CONFIG['GNU_AS']:
|
||||
SOURCES += ['icudata_gas.S']
|
||||
ASFLAGS += asflags
|
||||
|
|
Загрузка…
Ссылка в новой задаче