moz.build (1482B)
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2 # vim: set filetype=python: 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 # Build a library containing the ICU data for use in the JS shell, so that 8 # JSAPI consumers don't have to deal with setting ICU's data path. 9 Library("icudata") 10 11 LOCAL_INCLUDES += ["."] 12 13 prefix = "" 14 if (CONFIG["OS_ARCH"] == "WINNT" and CONFIG["TARGET_CPU"] == "x86") or CONFIG[ 15 "OS_ARCH" 16 ] == "Darwin": 17 prefix = "_" 18 19 data_file = { 20 "little": "icudt%sl.dat" % CONFIG["MOZ_ICU_VERSION"], 21 "big": "icudt%sb.dat" % CONFIG["MOZ_ICU_VERSION"], 22 } 23 data_dir = { 24 "little": SRCDIR, 25 "big": OBJDIR, 26 } 27 endianness = CONFIG["TARGET_ENDIANNESS"] or "little" 28 DEFINES["ICU_DATA_FILE"] = '"%s/%s"' % (data_dir[endianness], data_file[endianness]) 29 DEFINES["ICU_DATA_SYMBOL"] = "%sicudt%s_dat" % (prefix, CONFIG["MOZ_ICU_VERSION"]) 30 SOURCES += [ 31 "icu_data.S", 32 ] 33 34 if CONFIG["OS_ARCH"] == "WINNT" and CONFIG["CC_TYPE"] == "clang-cl": 35 USE_INTEGRATED_CLANGCL_AS = True 36 # Work around https://github.com/llvm/llvm-project/issues/92229 37 # We don't need debug flags on the command line for this file anyways. 38 ASM_FLAGS["DEBUG"] = [] 39 40 if CONFIG["TARGET_ENDIANNESS"] == "big": 41 GeneratedFile( 42 data_file["big"], script="convert_icudata.py", inputs=[data_file["little"]] 43 )