blob: 3f4cff9163a95d73f6c02ec8e0c82482f39265fc [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/host_byteorder.gni")
import("//third_party/icu/config.gni")
if (is_android) {
import("//build/config/android/rules.gni")
}
if (is_mac) {
import("//build/config/sanitizers/sanitizers.gni")
}
# Meta target that includes both icuuc and icui18n. Most targets want both.
# You can depend on the individually if you need to.
group("icu") {
public_deps = [
":icui18n",
":icuuc",
]
}
# Shared config used by ICU and all dependents.
config("icu_config") {
defines = [
# Tell ICU to not insert |using namespace icu;| into its headers,
# so that chrome's source explicitly has to use |icu::|.
"U_USING_ICU_NAMESPACE=0",
# We don't use ICU plugins and dyload is only necessary for them.
# NaCl-related builds also fail looking for dlfcn.h when it's enabled.
"U_ENABLE_DYLOAD=0",
]
if (!is_component_build) {
defines += [ "U_STATIC_IMPLEMENTATION" ]
}
include_dirs = [
"source/common",
"source/i18n",
]
if (icu_use_data_file) {
defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ]
} else {
if (is_win) {
defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED" ]
} else {
defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC" ]
}
}
if (is_win) {
defines += [ "UCHAR_TYPE=wchar_t" ]
} else {
defines += [ "UCHAR_TYPE=uint16_t" ]
}
}
# Config used only by ICU code.
config("icu_code") {
cflags = []
defines = [
"HAVE_DLOPEN=0",
# Only build encoding coverters and detectors necessary for HTML5.
"UCONFIG_ONLY_HTML_CONVERSION=1",
# No dependency on the default platform encoding.
# Will cut down the code size.
"U_CHARSET_IS_UTF8=1",
]
if (is_win) {
# Disable some compiler warnings.
cflags += [
"/wd4005", # Macro redefinition.
"/wd4068", # Unknown pragmas.
"/wd4267", # Conversion from size_t on 64-bits.
# http://bugs.icu-project.org/trac/ticket/12821
"/wd4333", # Right shift by too large amount.
"/utf-8", # ICU source files are in UTF-8.
]
} else if (is_linux || is_android) {
cflags += [
"-Wno-unused-function",
]
}
if (is_clang) {
cflags += [
# ICU has some code with the pattern:
# if (found = uprv_getWindowsTimeZoneInfo(...))
"-Wno-parentheses",
# ucnv2022.cpp contains three functions that are only used when
# certain preprocessor defines are set.
# unistr.cpp also has an unused function for non-component builds.
"-Wno-unused-function",
]
}
if (is_clang || is_linux || is_android) {
cflags += [
# ICU uses its own deprecated functions.
"-Wno-deprecated-declarations",
]
}
}
component("icui18n") {
# find source/i18n -maxdepth 1 ! -type d | egrep '\.(c|cpp|h)$' |\
# sort | sed 's/^\(.*\)$/ "\1",/'
sources = [
"source/i18n/affixpatternparser.cpp",
"source/i18n/affixpatternparser.h",
"source/i18n/alphaindex.cpp",
"source/i18n/anytrans.cpp",
"source/i18n/anytrans.h",
"source/i18n/astro.cpp",
"source/i18n/basictz.cpp",
"source/i18n/bocsu.cpp",
"source/i18n/bocsu.h",
"source/i18n/brktrans.cpp",
"source/i18n/brktrans.h",
"source/i18n/buddhcal.cpp",
"source/i18n/buddhcal.h",
"source/i18n/calendar.cpp",
"source/i18n/casetrn.cpp",
"source/i18n/casetrn.h",
"source/i18n/cecal.cpp",
"source/i18n/cecal.h",
"source/i18n/chnsecal.cpp",
"source/i18n/chnsecal.h",
"source/i18n/choicfmt.cpp",
"source/i18n/coleitr.cpp",
"source/i18n/collationbuilder.cpp",
"source/i18n/collationbuilder.h",
"source/i18n/collationcompare.cpp",
"source/i18n/collationcompare.h",
"source/i18n/collation.cpp",
"source/i18n/collationdatabuilder.cpp",
"source/i18n/collationdatabuilder.h",
"source/i18n/collationdata.cpp",
"source/i18n/collationdata.h",
"source/i18n/collationdatareader.cpp",
"source/i18n/collationdatareader.h",
"source/i18n/collationdatawriter.cpp",
"source/i18n/collationdatawriter.h",
"source/i18n/collationfastlatinbuilder.cpp",
"source/i18n/collationfastlatinbuilder.h",
"source/i18n/collationfastlatin.cpp",
"source/i18n/collationfastlatin.h",
"source/i18n/collationfcd.cpp",
"source/i18n/collationfcd.h",
"source/i18n/collation.h",
"source/i18n/collationiterator.cpp",
"source/i18n/collationiterator.h",
"source/i18n/collationkeys.cpp",
"source/i18n/collationkeys.h",
"source/i18n/collationroot.cpp",
"source/i18n/collationrootelements.cpp",
"source/i18n/collationrootelements.h",
"source/i18n/collationroot.h",
"source/i18n/collationruleparser.cpp",
"source/i18n/collationruleparser.h",
"source/i18n/collationsets.cpp",
"source/i18n/collationsets.h",
"source/i18n/collationsettings.cpp",
"source/i18n/collationsettings.h",
"source/i18n/collationtailoring.cpp",
"source/i18n/collationtailoring.h",
"source/i18n/collationweights.cpp",
"source/i18n/collationweights.h",
"source/i18n/coll.cpp",
"source/i18n/collunsafe.h",
"source/i18n/compactdecimalformat.cpp",
"source/i18n/coptccal.cpp",
"source/i18n/coptccal.h",
"source/i18n/cpdtrans.cpp",
"source/i18n/cpdtrans.h",
"source/i18n/csdetect.cpp",
"source/i18n/csdetect.h",
"source/i18n/csmatch.cpp",
"source/i18n/csmatch.h",
"source/i18n/csr2022.cpp",
"source/i18n/csr2022.h",
"source/i18n/csrecog.cpp",
"source/i18n/csrecog.h",
"source/i18n/csrmbcs.cpp",
"source/i18n/csrmbcs.h",
"source/i18n/csrsbcs.cpp",
"source/i18n/csrsbcs.h",
"source/i18n/csrucode.cpp",
"source/i18n/csrucode.h",
"source/i18n/csrutf8.cpp",
"source/i18n/csrutf8.h",
"source/i18n/curramt.cpp",
"source/i18n/currfmt.cpp",
"source/i18n/currfmt.h",
"source/i18n/currpinf.cpp",
"source/i18n/currunit.cpp",
"source/i18n/dangical.cpp",
"source/i18n/dangical.h",
"source/i18n/datefmt.cpp",
"source/i18n/dayperiodrules.cpp",
"source/i18n/dayperiodrules.h",
"source/i18n/dcfmtimp.h",
"source/i18n/dcfmtsym.cpp",
"source/i18n/decContext.cpp",
"source/i18n/decContext.h",
"source/i18n/decfmtst.cpp",
"source/i18n/decfmtst.h",
"source/i18n/decimalformatpattern.cpp",
"source/i18n/decimalformatpattern.h",
"source/i18n/decimalformatpatternimpl.h",
"source/i18n/decimfmt.cpp",
"source/i18n/decimfmtimpl.cpp",
"source/i18n/decimfmtimpl.h",
"source/i18n/decNumber.cpp",
"source/i18n/decNumber.h",
"source/i18n/decNumberLocal.h",
"source/i18n/digitaffix.cpp",
"source/i18n/digitaffixesandpadding.cpp",
"source/i18n/digitaffixesandpadding.h",
"source/i18n/digitaffix.h",
"source/i18n/digitformatter.cpp",
"source/i18n/digitformatter.h",
"source/i18n/digitgrouping.cpp",
"source/i18n/digitgrouping.h",
"source/i18n/digitinterval.cpp",
"source/i18n/digitinterval.h",
"source/i18n/digitlst.cpp",
"source/i18n/digitlst.h",
"source/i18n/dtfmtsym.cpp",
"source/i18n/dt_impl.h",
"source/i18n/dtitvfmt.cpp",
"source/i18n/dtitv_impl.h",
"source/i18n/dtitvinf.cpp",
"source/i18n/dtptngen.cpp",
"source/i18n/dtptngen_impl.h",
"source/i18n/dtrule.cpp",
"source/i18n/esctrn.cpp",
"source/i18n/esctrn.h",
"source/i18n/ethpccal.cpp",
"source/i18n/ethpccal.h",
"source/i18n/fmtable_cnv.cpp",
"source/i18n/fmtable.cpp",
"source/i18n/fmtableimp.h",
"source/i18n/format.cpp",
"source/i18n/fphdlimp.cpp",
"source/i18n/fphdlimp.h",
"source/i18n/fpositer.cpp",
"source/i18n/funcrepl.cpp",
"source/i18n/funcrepl.h",
"source/i18n/gender.cpp",
"source/i18n/gregocal.cpp",
"source/i18n/gregoimp.cpp",
"source/i18n/gregoimp.h",
"source/i18n/hebrwcal.cpp",
"source/i18n/hebrwcal.h",
"source/i18n/indiancal.cpp",
"source/i18n/indiancal.h",
"source/i18n/inputext.cpp",
"source/i18n/inputext.h",
"source/i18n/islamcal.cpp",
"source/i18n/islamcal.h",
"source/i18n/japancal.cpp",
"source/i18n/japancal.h",
"source/i18n/measfmt.cpp",
"source/i18n/measunit.cpp",
"source/i18n/measure.cpp",
"source/i18n/msgfmt.cpp",
"source/i18n/msgfmt_impl.h",
"source/i18n/name2uni.cpp",
"source/i18n/name2uni.h",
"source/i18n/nfrlist.h",
"source/i18n/nfrs.cpp",
"source/i18n/nfrs.h",
"source/i18n/nfrule.cpp",
"source/i18n/nfrule.h",
"source/i18n/nfsubs.cpp",
"source/i18n/nfsubs.h",
"source/i18n/nortrans.cpp",
"source/i18n/nortrans.h",
"source/i18n/nultrans.cpp",
"source/i18n/nultrans.h",
"source/i18n/numfmt.cpp",
"source/i18n/numsys.cpp",
"source/i18n/numsys_impl.h",
"source/i18n/olsontz.cpp",
"source/i18n/olsontz.h",
"source/i18n/persncal.cpp",
"source/i18n/persncal.h",
"source/i18n/pluralaffix.cpp",
"source/i18n/pluralaffix.h",
"source/i18n/plurfmt.cpp",
"source/i18n/plurrule.cpp",
"source/i18n/plurrule_impl.h",
"source/i18n/precision.cpp",
"source/i18n/precision.h",
"source/i18n/quant.cpp",
"source/i18n/quant.h",
"source/i18n/quantityformatter.cpp",
"source/i18n/quantityformatter.h",
"source/i18n/rbnf.cpp",
"source/i18n/rbt.cpp",
"source/i18n/rbt_data.cpp",
"source/i18n/rbt_data.h",
"source/i18n/rbt.h",
"source/i18n/rbt_pars.cpp",
"source/i18n/rbt_pars.h",
"source/i18n/rbt_rule.cpp",
"source/i18n/rbt_rule.h",
"source/i18n/rbt_set.cpp",
"source/i18n/rbt_set.h",
"source/i18n/rbtz.cpp",
"source/i18n/regexcmp.cpp",
"source/i18n/regexcmp.h",
"source/i18n/regexcst.h",
"source/i18n/regeximp.cpp",
"source/i18n/regeximp.h",
"source/i18n/regexst.cpp",
"source/i18n/regexst.h",
"source/i18n/regextxt.cpp",
"source/i18n/regextxt.h",
"source/i18n/region.cpp",
"source/i18n/region_impl.h",
"source/i18n/reldatefmt.cpp",
"source/i18n/reldtfmt.cpp",
"source/i18n/reldtfmt.h",
"source/i18n/rematch.cpp",
"source/i18n/remtrans.cpp",
"source/i18n/remtrans.h",
"source/i18n/repattrn.cpp",
"source/i18n/rulebasedcollator.cpp",
"source/i18n/scientificnumberformatter.cpp",
"source/i18n/scriptset.cpp",
"source/i18n/scriptset.h",
"source/i18n/search.cpp",
"source/i18n/selfmt.cpp",
"source/i18n/selfmtimpl.h",
"source/i18n/sharedbreakiterator.cpp",
"source/i18n/sharedbreakiterator.h",
"source/i18n/sharedcalendar.h",
"source/i18n/shareddateformatsymbols.h",
"source/i18n/sharednumberformat.h",
"source/i18n/sharedpluralrules.h",
"source/i18n/significantdigitinterval.h",
"source/i18n/simpletz.cpp",
"source/i18n/smallintformatter.cpp",
"source/i18n/smallintformatter.h",
"source/i18n/smpdtfmt.cpp",
"source/i18n/smpdtfst.cpp",
"source/i18n/smpdtfst.h",
"source/i18n/sortkey.cpp",
"source/i18n/standardplural.cpp",
"source/i18n/standardplural.h",
"source/i18n/strmatch.cpp",
"source/i18n/strmatch.h",
"source/i18n/strrepl.cpp",
"source/i18n/strrepl.h",
"source/i18n/stsearch.cpp",
"source/i18n/taiwncal.cpp",
"source/i18n/taiwncal.h",
"source/i18n/timezone.cpp",
"source/i18n/titletrn.cpp",
"source/i18n/titletrn.h",
"source/i18n/tmunit.cpp",
"source/i18n/tmutamt.cpp",
"source/i18n/tmutfmt.cpp",
"source/i18n/tolowtrn.cpp",
"source/i18n/tolowtrn.h",
"source/i18n/toupptrn.cpp",
"source/i18n/toupptrn.h",
"source/i18n/translit.cpp",
"source/i18n/transreg.cpp",
"source/i18n/transreg.h",
"source/i18n/tridpars.cpp",
"source/i18n/tridpars.h",
"source/i18n/tzfmt.cpp",
"source/i18n/tzgnames.cpp",
"source/i18n/tzgnames.h",
"source/i18n/tznames.cpp",
"source/i18n/tznames_impl.cpp",
"source/i18n/tznames_impl.h",
"source/i18n/tzrule.cpp",
"source/i18n/tztrans.cpp",
"source/i18n/ucal.cpp",
"source/i18n/ucln_in.cpp",
"source/i18n/ucln_in.h",
"source/i18n/ucol.cpp",
"source/i18n/ucoleitr.cpp",
"source/i18n/ucol_imp.h",
"source/i18n/ucol_res.cpp",
"source/i18n/ucol_sit.cpp",
"source/i18n/ucsdet.cpp",
"source/i18n/udat.cpp",
"source/i18n/udateintervalformat.cpp",
"source/i18n/udatpg.cpp",
"source/i18n/ufieldpositer.cpp",
"source/i18n/uitercollationiterator.cpp",
"source/i18n/uitercollationiterator.h",
"source/i18n/ulocdata.cpp",
"source/i18n/umsg.cpp",
"source/i18n/umsg_imp.h",
"source/i18n/unesctrn.cpp",
"source/i18n/unesctrn.h",
"source/i18n/uni2name.cpp",
"source/i18n/uni2name.h",
"source/i18n/unum.cpp",
"source/i18n/unumsys.cpp",
"source/i18n/upluralrules.cpp",
"source/i18n/uregexc.cpp",
"source/i18n/uregex.cpp",
"source/i18n/uregion.cpp",
"source/i18n/usearch.cpp",
"source/i18n/uspoof_build.cpp",
"source/i18n/uspoof_conf.cpp",
"source/i18n/uspoof_conf.h",
"source/i18n/uspoof.cpp",
"source/i18n/uspoof_impl.cpp",
"source/i18n/uspoof_impl.h",
"source/i18n/usrchimp.h",
"source/i18n/utf16collationiterator.cpp",
"source/i18n/utf16collationiterator.h",
"source/i18n/utf8collationiterator.cpp",
"source/i18n/utf8collationiterator.h",
"source/i18n/utmscale.cpp",
"source/i18n/utrans.cpp",
"source/i18n/valueformatter.cpp",
"source/i18n/valueformatter.h",
"source/i18n/visibledigits.cpp",
"source/i18n/visibledigits.h",
"source/i18n/vtzone.cpp",
"source/i18n/vzone.cpp",
"source/i18n/vzone.h",
"source/i18n/windtfmt.cpp",
"source/i18n/windtfmt.h",
"source/i18n/winnmfmt.cpp",
"source/i18n/winnmfmt.h",
"source/i18n/wintzimpl.cpp",
"source/i18n/wintzimpl.h",
"source/i18n/zonemeta.cpp",
"source/i18n/zonemeta.h",
"source/i18n/zrule.cpp",
"source/i18n/zrule.h",
"source/i18n/ztrans.cpp",
"source/i18n/ztrans.h",
]
# ls source/i18n/unicode/*h | sort | sed 's/^\(.*\)$/ "\1",/'
public = [
# crbug.com/726654: Make astro.h public until the upstream adds an API.
"source/i18n/astro.h",
"source/i18n/unicode/alphaindex.h",
"source/i18n/unicode/basictz.h",
"source/i18n/unicode/calendar.h",
"source/i18n/unicode/choicfmt.h",
"source/i18n/unicode/coleitr.h",
"source/i18n/unicode/coll.h",
"source/i18n/unicode/compactdecimalformat.h",
"source/i18n/unicode/curramt.h",
"source/i18n/unicode/currpinf.h",
"source/i18n/unicode/currunit.h",
"source/i18n/unicode/datefmt.h",
"source/i18n/unicode/dcfmtsym.h",
"source/i18n/unicode/decimfmt.h",
"source/i18n/unicode/dtfmtsym.h",
"source/i18n/unicode/dtitvfmt.h",
"source/i18n/unicode/dtitvinf.h",
"source/i18n/unicode/dtptngen.h",
"source/i18n/unicode/dtrule.h",
"source/i18n/unicode/fieldpos.h",
"source/i18n/unicode/fmtable.h",
"source/i18n/unicode/format.h",
"source/i18n/unicode/fpositer.h",
"source/i18n/unicode/gender.h",
"source/i18n/unicode/gregocal.h",
"source/i18n/unicode/measfmt.h",
"source/i18n/unicode/measunit.h",
"source/i18n/unicode/measure.h",
"source/i18n/unicode/msgfmt.h",
"source/i18n/unicode/numfmt.h",
"source/i18n/unicode/numsys.h",
"source/i18n/unicode/plurfmt.h",
"source/i18n/unicode/plurrule.h",
"source/i18n/unicode/rbnf.h",
"source/i18n/unicode/rbtz.h",
"source/i18n/unicode/regex.h",
"source/i18n/unicode/region.h",
"source/i18n/unicode/reldatefmt.h",
"source/i18n/unicode/scientificnumberformatter.h",
"source/i18n/unicode/search.h",
"source/i18n/unicode/selfmt.h",
"source/i18n/unicode/simpletz.h",
"source/i18n/unicode/smpdtfmt.h",
"source/i18n/unicode/sortkey.h",
"source/i18n/unicode/stsearch.h",
"source/i18n/unicode/tblcoll.h",
"source/i18n/unicode/timezone.h",
"source/i18n/unicode/tmunit.h",
"source/i18n/unicode/tmutamt.h",
"source/i18n/unicode/tmutfmt.h",
"source/i18n/unicode/translit.h",
"source/i18n/unicode/tzfmt.h",
"source/i18n/unicode/tznames.h",
"source/i18n/unicode/tzrule.h",
"source/i18n/unicode/tztrans.h",
"source/i18n/unicode/ucal.h",
"source/i18n/unicode/ucoleitr.h",
"source/i18n/unicode/ucol.h",
"source/i18n/unicode/ucsdet.h",
"source/i18n/unicode/udateintervalformat.h",
"source/i18n/unicode/udat.h",
"source/i18n/unicode/udatpg.h",
"source/i18n/unicode/ufieldpositer.h",
"source/i18n/unicode/uformattable.h",
"source/i18n/unicode/ugender.h",
"source/i18n/unicode/ulocdata.h",
"source/i18n/unicode/umsg.h",
"source/i18n/unicode/unirepl.h",
"source/i18n/unicode/unum.h",
"source/i18n/unicode/unumsys.h",
"source/i18n/unicode/upluralrules.h",
"source/i18n/unicode/uregex.h",
"source/i18n/unicode/uregion.h",
"source/i18n/unicode/ureldatefmt.h",
"source/i18n/unicode/usearch.h",
"source/i18n/unicode/uspoof.h",
"source/i18n/unicode/utmscale.h",
"source/i18n/unicode/utrans.h",
"source/i18n/unicode/vtzone.h",
]
defines = [ "U_I18N_IMPLEMENTATION" ]
deps = [
":icuuc",
]
# ICU uses RTTI, replace the default "no rtti" config.
configs -= [
"//build/config/compiler:no_rtti", # ICU uses RTTI.
"//build/config/compiler:chromium_code",
]
configs += [
"//build/config/compiler:rtti",
"//build/config/compiler:no_chromium_code",
]
configs += [ ":icu_code" ]
public_configs = [ ":icu_config" ]
if (is_fuchsia) {
# Fuchsia puts its own libicui18n.so in /system/lib where we need to put our
# .so when doing component builds, so we need to give this a different name.
output_name = "icui18n_cr"
}
}
component("icuuc") {
# find source/common -maxdepth 1 ! -type d | egrep '\.(c|cpp|h)$' |\
# sort | sed 's/^\(.*\)$/ "\1",/'
sources = [
"source/common/appendable.cpp",
"source/common/bmpset.cpp",
"source/common/bmpset.h",
"source/common/brkeng.cpp",
"source/common/brkeng.h",
"source/common/brkiter.cpp",
"source/common/bytestream.cpp",
"source/common/bytestriebuilder.cpp",
"source/common/bytestrie.cpp",
"source/common/bytestrieiterator.cpp",
"source/common/caniter.cpp",
"source/common/chariter.cpp",
"source/common/charstr.cpp",
"source/common/charstr.h",
"source/common/cmemory.cpp",
"source/common/cmemory.h",
"source/common/cpputils.h",
"source/common/cstr.cpp",
"source/common/cstr.h",
"source/common/cstring.cpp",
"source/common/cstring.h",
"source/common/cwchar.cpp",
"source/common/cwchar.h",
"source/common/dictbe.cpp",
"source/common/dictbe.h",
"source/common/dictionarydata.cpp",
"source/common/dictionarydata.h",
"source/common/dtintrv.cpp",
"source/common/edits.cpp",
"source/common/errorcode.cpp",
"source/common/filteredbrk.cpp",
"source/common/filterednormalizer2.cpp",
"source/common/hash.h",
"source/common/icudataver.cpp",
"source/common/icuplug.cpp",
"source/common/icuplugimp.h",
"source/common/listformatter.cpp",
"source/common/loadednormalizer2impl.cpp",
"source/common/localsvc.h",
"source/common/locavailable.cpp",
"source/common/locbased.cpp",
"source/common/locbased.h",
"source/common/locdispnames.cpp",
"source/common/locdspnm.cpp",
"source/common/locid.cpp",
"source/common/loclikely.cpp",
"source/common/locmap.cpp",
"source/common/locmap.h",
"source/common/locresdata.cpp",
"source/common/locutil.cpp",
"source/common/locutil.h",
"source/common/messageimpl.h",
"source/common/messagepattern.cpp",
"source/common/msvcres.h",
"source/common/mutex.h",
"source/common/norm2allmodes.h",
"source/common/norm2_nfc_data.h",
"source/common/normalizer2.cpp",
"source/common/normalizer2impl.cpp",
"source/common/normalizer2impl.h",
"source/common/normlzr.cpp",
"source/common/parsepos.cpp",
"source/common/patternprops.cpp",
"source/common/patternprops.h",
"source/common/pluralmap.cpp",
"source/common/pluralmap.h",
"source/common/propname.cpp",
"source/common/propname_data.h",
"source/common/propname.h",
"source/common/propsvec.cpp",
"source/common/propsvec.h",
"source/common/punycode.cpp",
"source/common/punycode.h",
"source/common/putil.cpp",
"source/common/putilimp.h",
"source/common/rbbi.cpp",
"source/common/rbbidata.cpp",
"source/common/rbbidata.h",
"source/common/rbbinode.cpp",
"source/common/rbbinode.h",
"source/common/rbbirb.cpp",
"source/common/rbbirb.h",
"source/common/rbbirpt.h",
"source/common/rbbiscan.cpp",
"source/common/rbbiscan.h",
"source/common/rbbisetb.cpp",
"source/common/rbbisetb.h",
"source/common/rbbistbl.cpp",
"source/common/rbbitblb.cpp",
"source/common/rbbitblb.h",
"source/common/resbund_cnv.cpp",
"source/common/resbund.cpp",
"source/common/resource.cpp",
"source/common/resource.h",
"source/common/ruleiter.cpp",
"source/common/ruleiter.h",
"source/common/schriter.cpp",
"source/common/serv.cpp",
"source/common/serv.h",
"source/common/servlk.cpp",
"source/common/servlkf.cpp",
"source/common/servloc.h",
"source/common/servls.cpp",
"source/common/servnotf.cpp",
"source/common/servnotf.h",
"source/common/servrbf.cpp",
"source/common/servslkf.cpp",
"source/common/sharedobject.cpp",
"source/common/sharedobject.h",
"source/common/simpleformatter.cpp",
"source/common/sprpimpl.h",
"source/common/stringpiece.cpp",
"source/common/stringtriebuilder.cpp",
"source/common/uarrsort.cpp",
"source/common/uarrsort.h",
"source/common/uassert.h",
"source/common/ubidi.cpp",
"source/common/ubidiimp.h",
"source/common/ubidiln.cpp",
"source/common/ubidi_props.cpp",
"source/common/ubidi_props_data.h",
"source/common/ubidi_props.h",
"source/common/ubiditransform.cpp",
"source/common/ubidiwrt.cpp",
"source/common/ubrk.cpp",
"source/common/ubrkimpl.h",
"source/common/ucase.cpp",
"source/common/ucase.h",
"source/common/ucasemap.cpp",
"source/common/ucasemap_imp.h",
"source/common/ucasemap_titlecase_brkiter.cpp",
"source/common/ucase_props_data.h",
"source/common/ucat.cpp",
"source/common/uchar.cpp",
"source/common/uchar_props_data.h",
"source/common/ucharstriebuilder.cpp",
"source/common/ucharstrie.cpp",
"source/common/ucharstrieiterator.cpp",
"source/common/uchriter.cpp",
"source/common/ucln_cmn.cpp",
"source/common/ucln_cmn.h",
"source/common/ucln.h",
"source/common/ucln_imp.h",
"source/common/ucmndata.cpp",
"source/common/ucmndata.h",
"source/common/ucnv2022.cpp",
"source/common/ucnv_bld.cpp",
"source/common/ucnv_bld.h",
"source/common/ucnvbocu.cpp",
"source/common/ucnv_cb.cpp",
"source/common/ucnv_cnv.cpp",
"source/common/ucnv_cnv.h",
"source/common/ucnv.cpp",
"source/common/ucnv_ct.cpp",
"source/common/ucnvdisp.cpp",
"source/common/ucnv_err.cpp",
"source/common/ucnv_ext.cpp",
"source/common/ucnv_ext.h",
"source/common/ucnvhz.cpp",
"source/common/ucnv_imp.h",
"source/common/ucnv_io.cpp",
"source/common/ucnv_io.h",
"source/common/ucnvisci.cpp",
"source/common/ucnvlat1.cpp",
"source/common/ucnv_lmb.cpp",
"source/common/ucnvmbcs.cpp",
"source/common/ucnvmbcs.h",
"source/common/ucnvscsu.cpp",
"source/common/ucnvsel.cpp",
"source/common/ucnv_set.cpp",
"source/common/ucnv_u16.cpp",
"source/common/ucnv_u32.cpp",
"source/common/ucnv_u7.cpp",
"source/common/ucnv_u8.cpp",
"source/common/ucol_data.h",
"source/common/ucol_swp.cpp",
"source/common/ucol_swp.h",
"source/common/ucurr.cpp",
"source/common/ucurrimp.h",
"source/common/udata.cpp",
"source/common/udatamem.cpp",
"source/common/udatamem.h",
"source/common/udataswp.cpp",
"source/common/udataswp.h",
"source/common/uelement.h",
"source/common/uenum.cpp",
"source/common/uenumimp.h",
"source/common/uhash.cpp",
"source/common/uhash.h",
"source/common/uhash_us.cpp",
"source/common/uidna.cpp",
"source/common/uinit.cpp",
"source/common/uinvchar.cpp",
"source/common/uinvchar.h",
"source/common/uiter.cpp",
"source/common/ulist.cpp",
"source/common/ulistformatter.cpp",
"source/common/ulist.h",
"source/common/uloc.cpp",
"source/common/ulocimp.h",
"source/common/uloc_keytype.cpp",
"source/common/uloc_tag.cpp",
"source/common/umapfile.cpp",
"source/common/umapfile.h",
"source/common/umath.cpp",
"source/common/umutex.cpp",
"source/common/umutex.h",
"source/common/unames.cpp",
"source/common/unifiedcache.cpp",
"source/common/unifiedcache.h",
"source/common/unifilt.cpp",
"source/common/unifunct.cpp",
"source/common/uniset_closure.cpp",
"source/common/uniset.cpp",
"source/common/uniset_props.cpp",
"source/common/unisetspan.cpp",
"source/common/unisetspan.h",
"source/common/unistrappender.h",
"source/common/unistr_case.cpp",
"source/common/unistr_case_locale.cpp",
"source/common/unistr_cnv.cpp",
"source/common/unistr.cpp",
"source/common/unistr_props.cpp",
"source/common/unistr_titlecase_brkiter.cpp",
"source/common/unormcmp.cpp",
"source/common/unorm.cpp",
"source/common/unormimp.h",
"source/common/uobject.cpp",
"source/common/uposixdefs.h",
"source/common/uprops.cpp",
"source/common/uprops.h",
"source/common/uresbund.cpp",
"source/common/ures_cnv.cpp",
"source/common/uresdata.cpp",
"source/common/uresdata.h",
"source/common/uresimp.h",
"source/common/ureslocs.h",
"source/common/usc_impl.cpp",
"source/common/usc_impl.h",
"source/common/uscript.cpp",
"source/common/uscript_props.cpp",
"source/common/uset.cpp",
"source/common/uset_imp.h",
"source/common/usetiter.cpp",
"source/common/uset_props.cpp",
"source/common/ushape.cpp",
"source/common/usprep.cpp",
"source/common/ustack.cpp",
"source/common/ustrcase.cpp",
"source/common/ustrcase_locale.cpp",
"source/common/ustr_cnv.cpp",
"source/common/ustr_cnv.h",
"source/common/ustrenum.cpp",
"source/common/ustrenum.h",
"source/common/ustrfmt.cpp",
"source/common/ustrfmt.h",
"source/common/ustr_imp.h",
"source/common/ustring.cpp",
"source/common/ustr_titlecase_brkiter.cpp",
"source/common/ustrtrns.cpp",
"source/common/ustr_wcs.cpp",
"source/common/utext.cpp",
"source/common/utf_impl.cpp",
"source/common/util.cpp",
"source/common/util.h",
"source/common/util_props.cpp",
"source/common/utrace.cpp",
"source/common/utracimp.h",
"source/common/utrie2_builder.cpp",
"source/common/utrie2.cpp",
"source/common/utrie2.h",
"source/common/utrie2_impl.h",
"source/common/utrie.cpp",
"source/common/utrie.h",
"source/common/uts46.cpp",
"source/common/utypeinfo.h",
"source/common/utypes.cpp",
"source/common/uvector.cpp",
"source/common/uvector.h",
"source/common/uvectr32.cpp",
"source/common/uvectr32.h",
"source/common/uvectr64.cpp",
"source/common/uvectr64.h",
"source/common/wintz.cpp",
"source/common/wintz.h",
]
# ls source/common/unicode/*h | sort | sed 's/^\(.*\)$/ "\1",/'
public = [
"source/common/unicode/appendable.h",
"source/common/unicode/brkiter.h",
"source/common/unicode/bytestream.h",
"source/common/unicode/bytestriebuilder.h",
"source/common/unicode/bytestrie.h",
"source/common/unicode/caniter.h",
"source/common/unicode/casemap.h",
"source/common/unicode/char16ptr.h",
"source/common/unicode/chariter.h",
"source/common/unicode/dbbi.h",
"source/common/unicode/docmain.h",
"source/common/unicode/dtintrv.h",
"source/common/unicode/edits.h",
"source/common/unicode/enumset.h",
"source/common/unicode/errorcode.h",
"source/common/unicode/filteredbrk.h",
"source/common/unicode/icudataver.h",
"source/common/unicode/icuplug.h",
"source/common/unicode/idna.h",
"source/common/unicode/listformatter.h",
"source/common/unicode/localpointer.h",
"source/common/unicode/locdspnm.h",
"source/common/unicode/locid.h",
"source/common/unicode/messagepattern.h",
"source/common/unicode/normalizer2.h",
"source/common/unicode/normlzr.h",
"source/common/unicode/parseerr.h",
"source/common/unicode/parsepos.h",
"source/common/unicode/platform.h",
"source/common/unicode/ptypes.h",
"source/common/unicode/putil.h",
"source/common/unicode/rbbi.h",
"source/common/unicode/rep.h",
"source/common/unicode/resbund.h",
"source/common/unicode/schriter.h",
"source/common/unicode/simpleformatter.h",
"source/common/unicode/std_string.h",
"source/common/unicode/strenum.h",
"source/common/unicode/stringpiece.h",
"source/common/unicode/stringtriebuilder.h",
"source/common/unicode/symtable.h",
"source/common/unicode/ubidi.h",
"source/common/unicode/ubiditransform.h",
"source/common/unicode/ubrk.h",
"source/common/unicode/ucasemap.h",
"source/common/unicode/ucat.h",
"source/common/unicode/uchar.h",
"source/common/unicode/ucharstriebuilder.h",
"source/common/unicode/ucharstrie.h",
"source/common/unicode/uchriter.h",
"source/common/unicode/uclean.h",
"source/common/unicode/ucnv_cb.h",
"source/common/unicode/ucnv_err.h",
"source/common/unicode/ucnv.h",
"source/common/unicode/ucnvsel.h",
"source/common/unicode/uconfig.h",
"source/common/unicode/ucurr.h",
"source/common/unicode/udata.h",
"source/common/unicode/udisplaycontext.h",
"source/common/unicode/uenum.h",
"source/common/unicode/uidna.h",
"source/common/unicode/uiter.h",
"source/common/unicode/uldnames.h",
"source/common/unicode/ulistformatter.h",
"source/common/unicode/uloc.h",
"source/common/unicode/umachine.h",
"source/common/unicode/umisc.h",
"source/common/unicode/unifilt.h",
"source/common/unicode/unifunct.h",
"source/common/unicode/unimatch.h",
"source/common/unicode/uniset.h",
"source/common/unicode/unistr.h",
"source/common/unicode/unorm2.h",
"source/common/unicode/unorm.h",
"source/common/unicode/uobject.h",
"source/common/unicode/urename.h",
"source/common/unicode/urep.h",
"source/common/unicode/ures.h",
"source/common/unicode/uscript.h",
"source/common/unicode/uset.h",
"source/common/unicode/usetiter.h",
"source/common/unicode/ushape.h",
"source/common/unicode/usprep.h",
"source/common/unicode/ustring.h",
"source/common/unicode/ustringtrie.h",
"source/common/unicode/utext.h",
"source/common/unicode/utf16.h",
"source/common/unicode/utf32.h",
"source/common/unicode/utf8.h",
"source/common/unicode/utf.h",
"source/common/unicode/utf_old.h",
"source/common/unicode/utrace.h",
"source/common/unicode/utypes.h",
"source/common/unicode/uvernum.h",
"source/common/unicode/uversion.h",
]
defines = [ "U_COMMON_IMPLEMENTATION" ]
deps = [
":icudata",
]
configs -= [
"//build/config/compiler:no_rtti", # ICU uses RTTI.
"//build/config/compiler:chromium_code",
]
configs += [
"//build/config/compiler:rtti",
"//build/config/compiler:no_chromium_code",
]
configs += [ ":icu_code" ]
public_configs = [ ":icu_config" ]
if (is_win || icu_use_data_file) {
sources += [ "source/stubdata/stubdata.cpp" ]
defines += [ "U_ICUDATAENTRY_IN_COMMON" ]
}
if (is_fuchsia) {
# Fuchsia puts its own libicuuc.so in /system/lib where we need to put our
# .so when doing component builds, so we need to give this a different name.
output_name = "icuuc_cr"
}
}
if (is_android && enable_java_templates) {
android_assets("icu_assets") {
if (icu_use_data_file) {
sources = [ "$root_out_dir/icudtl.dat" ]
deps = [ ":icudata" ]
disable_compression = true
}
}
}
# TODO(GYP): Gyp has considerations here for QNX and for the host toolchain
# that have not been ported over.
if (is_android) {
data_dir = "android"
} else if (is_ios) {
data_dir = "ios"
} else {
data_dir = "common"
}
if (current_cpu == "mips" || current_cpu == "mips64" ||
host_byteorder == "big") {
data_bundle_prefix = "icudtb"
} else {
data_bundle_prefix = "icudtl"
}
data_bundle = "${data_bundle_prefix}.dat"
# TODO(GYP) support use_system_icu.
if (icu_use_data_file) {
if (is_ios) {
bundle_data("icudata") {
sources = [ "$data_dir/$data_bundle" ]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
} else {
copy("icudata") {
sources = [ "$data_dir/$data_bundle" ]
outputs = [ "$root_out_dir/$data_bundle" ]
data = [ "$root_out_dir/$data_bundle" ]
}
}
} else {
if (is_win) {
# On Windows the target DLL is pre-built so just use a copy rule.
# data_bundle and data_dir have to be used to avoid 'unused variable'
# error.
data_bundle = "icudt.dll"
data_dir = "windows"
copy("icudata") {
sources = [ "$data_dir/$data_bundle" ]
outputs = [ "$root_out_dir/$data_bundle" ]
data = outputs
}
} else {
data_assembly = "$target_gen_dir/${data_bundle_prefix}_dat.S"
action("make_data_assembly") {
script = "scripts/make_data_assembly.py"
inputs = [ "$data_dir/$data_bundle" ]
outputs = [ "$data_assembly" ]
args = [
rebase_path(inputs[0], root_build_dir),
rebase_path(data_assembly, root_build_dir),
]
# TODO(GYP): Gyp has considerations here for QNX and for the host
# toolchain that have not been ported over.
if (is_mac || is_ios) {
args += [ "--mac" ]
}
}
source_set("icudata") {
sources = [ "$data_assembly" ]
defines = [ "U_HIDE_DATA_SYMBOL" ]
deps = [ ":make_data_assembly", ]
}
}
}