tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

icu.gn (6915B)


      1 # Copyright 2016 The Chromium Authors
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 import("//chromium/build/config/linux/pkg_config.gni")
      6 import("//chromium/build/shim_headers.gni")
      7 
      8 group("icu") {
      9   public_deps = [
     10     ":icui18n",
     11     ":icuuc",
     12   ]
     13 }
     14 
     15 config("icu_config") {
     16   defines = [
     17     "USING_SYSTEM_ICU=1",
     18     "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC",
     19 
     20     # U_EXPORT (defined in unicode/platform.h) is used to set public visibility
     21     # on classes through the U_COMMON_API and U_I18N_API macros (among others).
     22     # When linking against the system ICU library, we want its symbols to have
     23     # public LTO visibility. This disables CFI checks for the ICU classes and
     24     # allows whole-program optimization to be applied to the rest of Chromium.
     25     #
     26     # Both U_COMMON_API and U_I18N_API macros would be defined to U_EXPORT only
     27     # when U_COMBINED_IMPLEMENTATION is defined (see unicode/utypes.h). Because
     28     # we override the default system UCHAR_TYPE (char16_t), it is not possible
     29     # to use U_COMBINED_IMPLEMENTATION at this moment, meaning the U_COMMON_API
     30     # and U_I18N_API macros are set to U_IMPORT which is an empty definition.
     31     #
     32     # Until building with UCHAR_TYPE=char16_t is supported, one way to apply
     33     # public visibility (and thus public LTO visibility) to all ICU classes is
     34     # to define U_IMPORT to have the same value as U_EXPORT. For more details,
     35     # please see: https://crbug.com/822820
     36     "U_IMPORT=U_EXPORT",
     37   ]
     38 }
     39 
     40 pkg_config("system_icui18n") {
     41   packages = [ "icu-i18n" ]
     42 }
     43 
     44 pkg_config("system_icuuc") {
     45   packages = [ "icu-uc" ]
     46 }
     47 
     48 source_set("icui18n") {
     49   deps = [ ":icui18n_shim" ]
     50   public_configs = [
     51     ":icu_config",
     52     ":system_icui18n",
     53   ]
     54 }
     55 
     56 source_set("icuuc") {
     57   deps = [ ":icuuc_shim" ]
     58   public_configs = [
     59     ":icu_config",
     60     ":system_icuuc",
     61   ]
     62 }
     63 
     64 group("icuuc_public") {
     65   public_deps = [ ":icuuc" ]
     66 }
     67 
     68 shim_headers("icui18n_shim") {
     69   root_path = "source/i18n"
     70   headers = [
     71     # This list can easily be updated using the commands below:
     72     # cd third_party/icu/source/i18n
     73     # find unicode -iname '*.h' -printf '    "%p",\n' | LC_ALL=C sort -u
     74     "unicode/alphaindex.h",
     75     "unicode/basictz.h",
     76     "unicode/calendar.h",
     77     "unicode/choicfmt.h",
     78     "unicode/coleitr.h",
     79     "unicode/coll.h",
     80     "unicode/compactdecimalformat.h",
     81     "unicode/curramt.h",
     82     "unicode/currpinf.h",
     83     "unicode/currunit.h",
     84     "unicode/datefmt.h",
     85     "unicode/dcfmtsym.h",
     86     "unicode/decimfmt.h",
     87     "unicode/dtfmtsym.h",
     88     "unicode/dtitvfmt.h",
     89     "unicode/dtitvinf.h",
     90     "unicode/dtptngen.h",
     91     "unicode/dtrule.h",
     92     "unicode/fieldpos.h",
     93     "unicode/fmtable.h",
     94     "unicode/format.h",
     95     "unicode/fpositer.h",
     96     "unicode/gender.h",
     97     "unicode/gregocal.h",
     98     "unicode/listformatter.h",
     99     "unicode/measfmt.h",
    100     "unicode/measunit.h",
    101     "unicode/measure.h",
    102     "unicode/msgfmt.h",
    103     "unicode/numfmt.h",
    104     "unicode/numsys.h",
    105     "unicode/plurfmt.h",
    106     "unicode/plurrule.h",
    107     "unicode/rbnf.h",
    108     "unicode/rbtz.h",
    109     "unicode/regex.h",
    110     "unicode/region.h",
    111     "unicode/reldatefmt.h",
    112     "unicode/scientificnumberformatter.h",
    113     "unicode/search.h",
    114     "unicode/selfmt.h",
    115     "unicode/simpletz.h",
    116     "unicode/smpdtfmt.h",
    117     "unicode/sortkey.h",
    118     "unicode/stsearch.h",
    119     "unicode/tblcoll.h",
    120     "unicode/timezone.h",
    121     "unicode/tmunit.h",
    122     "unicode/tmutamt.h",
    123     "unicode/tmutfmt.h",
    124     "unicode/translit.h",
    125     "unicode/tzfmt.h",
    126     "unicode/tznames.h",
    127     "unicode/tzrule.h",
    128     "unicode/tztrans.h",
    129     "unicode/ucal.h",
    130     "unicode/ucol.h",
    131     "unicode/ucoleitr.h",
    132     "unicode/ucsdet.h",
    133     "unicode/udat.h",
    134     "unicode/udateintervalformat.h",
    135     "unicode/udatpg.h",
    136     "unicode/ufieldpositer.h",
    137     "unicode/uformattable.h",
    138     "unicode/ugender.h",
    139     "unicode/ulocdata.h",
    140     "unicode/umsg.h",
    141     "unicode/unirepl.h",
    142     "unicode/unum.h",
    143     "unicode/unumsys.h",
    144     "unicode/upluralrules.h",
    145     "unicode/uregex.h",
    146     "unicode/uregion.h",
    147     "unicode/ureldatefmt.h",
    148     "unicode/usearch.h",
    149     "unicode/uspoof.h",
    150     "unicode/utmscale.h",
    151     "unicode/utrans.h",
    152     "unicode/vtzone.h",
    153   ]
    154 }
    155 
    156 shim_headers("icuuc_shim") {
    157   root_path = "source/common"
    158   headers = [
    159     # This list can easily be updated using the commands below:
    160     # cd third_party/icu/source/common
    161     # find unicode -iname '*.h' -printf '    "%p",\n' | LC_ALL=C sort -u
    162     "unicode/appendable.h",
    163     "unicode/brkiter.h",
    164     "unicode/bytestream.h",
    165     "unicode/bytestrie.h",
    166     "unicode/bytestriebuilder.h",
    167     "unicode/caniter.h",
    168     "unicode/casemap.h",
    169     "unicode/char16ptr.h",
    170     "unicode/chariter.h",
    171     "unicode/dbbi.h",
    172     "unicode/docmain.h",
    173     "unicode/dtintrv.h",
    174     "unicode/edits.h",
    175     "unicode/enumset.h",
    176     "unicode/errorcode.h",
    177     "unicode/filteredbrk.h",
    178     "unicode/icudataver.h",
    179     "unicode/icuplug.h",
    180     "unicode/idna.h",
    181     "unicode/localematcher.h",
    182     "unicode/localpointer.h",
    183     "unicode/locdspnm.h",
    184     "unicode/locid.h",
    185     "unicode/messagepattern.h",
    186     "unicode/normalizer2.h",
    187     "unicode/normlzr.h",
    188     "unicode/parseerr.h",
    189     "unicode/parsepos.h",
    190     "unicode/platform.h",
    191     "unicode/ptypes.h",
    192     "unicode/putil.h",
    193     "unicode/rbbi.h",
    194     "unicode/rep.h",
    195     "unicode/resbund.h",
    196     "unicode/schriter.h",
    197     "unicode/simpleformatter.h",
    198     "unicode/std_string.h",
    199     "unicode/strenum.h",
    200     "unicode/stringpiece.h",
    201     "unicode/stringtriebuilder.h",
    202     "unicode/symtable.h",
    203     "unicode/ubidi.h",
    204     "unicode/ubiditransform.h",
    205     "unicode/ubrk.h",
    206     "unicode/ucasemap.h",
    207     "unicode/ucat.h",
    208     "unicode/uchar.h",
    209     "unicode/ucharstrie.h",
    210     "unicode/ucharstriebuilder.h",
    211     "unicode/uchriter.h",
    212     "unicode/uclean.h",
    213     "unicode/ucnv.h",
    214     "unicode/ucnv_cb.h",
    215     "unicode/ucnv_err.h",
    216     "unicode/ucnvsel.h",
    217     "unicode/uconfig.h",
    218     "unicode/ucurr.h",
    219     "unicode/udata.h",
    220     "unicode/udisplaycontext.h",
    221     "unicode/uenum.h",
    222     "unicode/uidna.h",
    223     "unicode/uiter.h",
    224     "unicode/uldnames.h",
    225     "unicode/ulistformatter.h",
    226     "unicode/uloc.h",
    227     "unicode/umachine.h",
    228     "unicode/umisc.h",
    229     "unicode/unifilt.h",
    230     "unicode/unifunct.h",
    231     "unicode/unimatch.h",
    232     "unicode/uniset.h",
    233     "unicode/unistr.h",
    234     "unicode/unorm.h",
    235     "unicode/unorm2.h",
    236     "unicode/uobject.h",
    237     "unicode/urename.h",
    238     "unicode/urep.h",
    239     "unicode/ures.h",
    240     "unicode/uscript.h",
    241     "unicode/uset.h",
    242     "unicode/usetiter.h",
    243     "unicode/ushape.h",
    244     "unicode/usprep.h",
    245     "unicode/ustring.h",
    246     "unicode/ustringtrie.h",
    247     "unicode/utext.h",
    248     "unicode/utf.h",
    249     "unicode/utf16.h",
    250     "unicode/utf32.h",
    251     "unicode/utf8.h",
    252     "unicode/utf_old.h",
    253     "unicode/utrace.h",
    254     "unicode/utypes.h",
    255     "unicode/uvernum.h",
    256     "unicode/uversion.h",
    257   ]
    258 }