11cb0ef41Sopenharmony_ci# Copyright 2021 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci# found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_cifilegroup( 61cb0ef41Sopenharmony_ci name = "icudata", 71cb0ef41Sopenharmony_ci srcs = ["common/icudtl.dat"], 81cb0ef41Sopenharmony_ci) 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_cicc_library( 111cb0ef41Sopenharmony_ci name = "icuuc", 121cb0ef41Sopenharmony_ci srcs = glob([ 131cb0ef41Sopenharmony_ci "source/common/**/*.h", 141cb0ef41Sopenharmony_ci "source/common/**/*.cpp", 151cb0ef41Sopenharmony_ci ]), 161cb0ef41Sopenharmony_ci copts = select({ 171cb0ef41Sopenharmony_ci "@platforms//os:windows": [ 181cb0ef41Sopenharmony_ci "/wd4005", # Macro redefinition. 191cb0ef41Sopenharmony_ci "/wd4068", # Unknown pragmas. 201cb0ef41Sopenharmony_ci "/wd4267", # Conversion from size_t on 64-bits. 211cb0ef41Sopenharmony_ci "/utf-8", # ICU source files are in UTF-8. 221cb0ef41Sopenharmony_ci ], 231cb0ef41Sopenharmony_ci "//conditions:default": [ 241cb0ef41Sopenharmony_ci "-Wno-unused-function", 251cb0ef41Sopenharmony_ci "-Wno-parentheses", 261cb0ef41Sopenharmony_ci "-Wno-unused-function", 271cb0ef41Sopenharmony_ci "-Wno-unused-variable", 281cb0ef41Sopenharmony_ci "-Wno-deprecated-declarations", 291cb0ef41Sopenharmony_ci ], 301cb0ef41Sopenharmony_ci }), 311cb0ef41Sopenharmony_ci data = [":icudata"], 321cb0ef41Sopenharmony_ci defines = [ 331cb0ef41Sopenharmony_ci "U_COMMON_IMPLEMENTATION", 341cb0ef41Sopenharmony_ci "U_ICUDATAENTRY_IN_COMMON", 351cb0ef41Sopenharmony_ci "HAVE_DLOPEN=0", 361cb0ef41Sopenharmony_ci "UCONFIG_ONLY_HTML_CONVERSION=1", 371cb0ef41Sopenharmony_ci "U_CHARSET_IS_UTF8=1", 381cb0ef41Sopenharmony_ci "U_USING_ICU_NAMESPACE=0", 391cb0ef41Sopenharmony_ci "U_ENABLE_DYLOAD=0", 401cb0ef41Sopenharmony_ci "USE_CHROMIUM_ICU=1", 411cb0ef41Sopenharmony_ci "U_ENABLE_TRACING=1", 421cb0ef41Sopenharmony_ci "U_ENABLE_RESOURCE_TRACING=0", 431cb0ef41Sopenharmony_ci "UNISTR_FROM_STRING_EXPLICIT=", 441cb0ef41Sopenharmony_ci "UNISTR_FROM_CHAR_EXPLICIT=", 451cb0ef41Sopenharmony_ci ] + select({ 461cb0ef41Sopenharmony_ci "@platforms//os:windows": [ 471cb0ef41Sopenharmony_ci "U_STATIC_IMPLEMENTATION", 481cb0ef41Sopenharmony_ci "UNICODE", 491cb0ef41Sopenharmony_ci "_UNICODE", 501cb0ef41Sopenharmony_ci ], 511cb0ef41Sopenharmony_ci "//conditions:default": [], 521cb0ef41Sopenharmony_ci }), 531cb0ef41Sopenharmony_ci includes = [ 541cb0ef41Sopenharmony_ci "source/common", 551cb0ef41Sopenharmony_ci "source/i18n", 561cb0ef41Sopenharmony_ci ], 571cb0ef41Sopenharmony_ci tags = ["requires-rtti"], 581cb0ef41Sopenharmony_ci alwayslink = 1, 591cb0ef41Sopenharmony_ci) 601cb0ef41Sopenharmony_ci 611cb0ef41Sopenharmony_cicc_library( 621cb0ef41Sopenharmony_ci name = "icui18n", 631cb0ef41Sopenharmony_ci srcs = glob([ 641cb0ef41Sopenharmony_ci "source/i18n/**/*.h", 651cb0ef41Sopenharmony_ci "source/i18n/**/*.cpp", 661cb0ef41Sopenharmony_ci ]), 671cb0ef41Sopenharmony_ci copts = select({ 681cb0ef41Sopenharmony_ci "@platforms//os:windows": [ 691cb0ef41Sopenharmony_ci "/wd4005", # Macro redefinition. 701cb0ef41Sopenharmony_ci "/wd4068", # Unknown pragmas. 711cb0ef41Sopenharmony_ci "/wd4267", # Conversion from size_t on 64-bits. 721cb0ef41Sopenharmony_ci "/utf-8", # ICU source files are in UTF-8. 731cb0ef41Sopenharmony_ci ], 741cb0ef41Sopenharmony_ci "//conditions:default": [], 751cb0ef41Sopenharmony_ci }), 761cb0ef41Sopenharmony_ci defines = [ 771cb0ef41Sopenharmony_ci "U_I18N_IMPLEMENTATION", 781cb0ef41Sopenharmony_ci ] + select({ 791cb0ef41Sopenharmony_ci "@platforms//os:windows": [ 801cb0ef41Sopenharmony_ci "U_STATIC_IMPLEMENTATION", 811cb0ef41Sopenharmony_ci "UNICODE", 821cb0ef41Sopenharmony_ci "_UNICODE", 831cb0ef41Sopenharmony_ci ], 841cb0ef41Sopenharmony_ci "//conditions:default": [], 851cb0ef41Sopenharmony_ci }), 861cb0ef41Sopenharmony_ci deps = [":icuuc"], 871cb0ef41Sopenharmony_ci alwayslink = 1, 881cb0ef41Sopenharmony_ci) 891cb0ef41Sopenharmony_ci 901cb0ef41Sopenharmony_cicc_library( 911cb0ef41Sopenharmony_ci name = "icu", 921cb0ef41Sopenharmony_ci srcs = [ 931cb0ef41Sopenharmony_ci "source/stubdata/stubdata.cpp", 941cb0ef41Sopenharmony_ci ], 951cb0ef41Sopenharmony_ci hdrs = glob([ 961cb0ef41Sopenharmony_ci "source/common/unicode/*.h", 971cb0ef41Sopenharmony_ci "source/i18n/unicode/*.h", 981cb0ef41Sopenharmony_ci ]), 991cb0ef41Sopenharmony_ci copts = select({ 1001cb0ef41Sopenharmony_ci "@platforms//os:windows": [ 1011cb0ef41Sopenharmony_ci "/wd4005", # Macro redefinition. 1021cb0ef41Sopenharmony_ci "/wd4068", # Unknown pragmas. 1031cb0ef41Sopenharmony_ci "/wd4267", # Conversion from size_t on 64-bits. 1041cb0ef41Sopenharmony_ci "/utf-8", # ICU source files are in UTF-8. 1051cb0ef41Sopenharmony_ci ], 1061cb0ef41Sopenharmony_ci "//conditions:default": [], 1071cb0ef41Sopenharmony_ci }), 1081cb0ef41Sopenharmony_ci defines = [ 1091cb0ef41Sopenharmony_ci "U_I18N_IMPLEMENTATION", 1101cb0ef41Sopenharmony_ci ] + select({ 1111cb0ef41Sopenharmony_ci "@platforms//os:windows": [ 1121cb0ef41Sopenharmony_ci "U_STATIC_IMPLEMENTATION", 1131cb0ef41Sopenharmony_ci "UNICODE", 1141cb0ef41Sopenharmony_ci "_UNICODE", 1151cb0ef41Sopenharmony_ci ], 1161cb0ef41Sopenharmony_ci "//conditions:default": [], 1171cb0ef41Sopenharmony_ci }), 1181cb0ef41Sopenharmony_ci include_prefix = "third_party/icu", 1191cb0ef41Sopenharmony_ci visibility = ["//visibility:public"], 1201cb0ef41Sopenharmony_ci deps = [ 1211cb0ef41Sopenharmony_ci ":icui18n", 1221cb0ef41Sopenharmony_ci ":icuuc", 1231cb0ef41Sopenharmony_ci ], 1241cb0ef41Sopenharmony_ci alwayslink = 1, 1251cb0ef41Sopenharmony_ci) 126