• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package(
2    default_visibility = ["//visibility:public"],
3)
4
5licenses(["notice"])  # Apache 2.0
6
7exports_files([
8    "icu4c/LICENSE",
9    "icu4j/main/shared/licenses/LICENSE",
10])
11
12cc_library(
13    name = "headers",
14    hdrs = glob(["icu4c/source/common/unicode/*.h"]),
15    includes = [
16        "icu4c/source/common",
17    ],
18    deps = [
19    ],
20)
21
22cc_library(
23    name = "common",
24    hdrs = glob(["icu4c/source/common/unicode/*.h"]),
25    includes = [
26        "icu4c/source/common",
27    ],
28    deps = [
29        ":icuuc",
30    ],
31)
32
33cc_library(
34    name = "icuuc",
35    srcs = glob(
36        [
37            "icu4c/source/common/*.c",
38            "icu4c/source/common/*.cpp",
39            "icu4c/source/stubdata/*.cpp",
40        ],
41    ),
42    hdrs = glob([
43        "icu4c/source/common/*.h",
44    ]),
45    copts = [
46        "-DU_COMMON_IMPLEMENTATION",
47        "-DU_HAVE_STD_ATOMICS",  # TODO(gunan): Remove when TF is on ICU 64+.
48    ] + select({
49        ":android": [
50            "-fdata-sections",
51            "-DU_HAVE_NL_LANGINFO_CODESET=0",
52            "-Wno-deprecated-declarations",
53        ],
54        ":apple": [
55            "-Wno-shorten-64-to-32",
56            "-Wno-unused-variable",
57        ],
58        ":windows": [
59            "/utf-8",
60            "/DLOCALE_ALLOW_NEUTRAL_NAMES=0",
61        ],
62        "//conditions:default": [],
63    }),
64    tags = ["requires-rtti"],
65    visibility = [
66        "//visibility:private",
67    ],
68    deps = [
69        ":headers",
70    ],
71)
72
73config_setting(
74    name = "android",
75    values = {"crosstool_top": "//external:android/crosstool"},
76)
77
78config_setting(
79    name = "apple",
80    values = {"cpu": "darwin"},
81)
82
83config_setting(
84    name = "windows",
85    values = {"cpu": "x64_windows"},
86)
87